ixed some more warnings

This commit is contained in:
Martin Pulec
2023-10-11 11:39:28 +02:00
parent 3f50d29246
commit c0e69d5896
2 changed files with 2 additions and 1 deletions

View File

@@ -829,7 +829,7 @@ bool setup_codecs_and_controls_from_sdp(FILE *sdp_file, void *state) {
if(tmpBuff!=NULL){
if ((unsigned) countT < sizeof tracks / sizeof tracks[0]) {
//debug_msg("track = %s\n",tmpBuff);
strncpy(tracks[countT],tmpBuff,MIN(strlen(tmpBuff)-2, sizeof tracks[countT] - 1));
strncpy(tracks[countT], tmpBuff, sizeof tracks[countT] - 1);
tracks[countT][MIN(strlen(tmpBuff)-2, sizeof tracks[countT] - 1)] = '\0';
countT++;
} else {

View File

@@ -399,6 +399,7 @@ aud_ctx_set_ch_layout(struct AVCodecContext *ctx, int ch_count, bool raw)
}
av_channel_layout_default(&ctx->ch_layout, ch_count);
#else
(void) raw;
ctx->channel_layout = av_get_default_channel_layout(ch_count);
#endif
}