From c0e69d5896e8ade170b9dfa6eefebdb875de6e57 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 11 Oct 2023 11:39:28 +0200 Subject: [PATCH] ixed some more warnings --- src/video_capture/rtsp.c | 2 +- src/video_display/file.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_capture/rtsp.c b/src/video_capture/rtsp.c index e94438a1a..14d54d3ee 100644 --- a/src/video_capture/rtsp.c +++ b/src/video_capture/rtsp.c @@ -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 { diff --git a/src/video_display/file.c b/src/video_display/file.c index e0e246aa5..7467a4d4d 100644 --- a/src/video_display/file.c +++ b/src/video_display/file.c @@ -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 }