From b50cbdc04f8da7fcb987566aaf4555d84b0d07f9 Mon Sep 17 00:00:00 2001 From: James Almer Date: Wed, 18 Mar 2026 13:29:23 -0300 Subject: [PATCH] fftools/ffmpeg_demux: properly unnitialize the side_data_prefer_packet AVBprint buffer Fixes Coverity issue CID 1689616. Signed-off-by: James Almer --- fftools/ffmpeg_demux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index c317987841..04ee2cc2ed 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1630,10 +1630,9 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st, AVDictiona av_bprintf(&bp, ","); av_bprintf(&bp, "content_light_level"); } - if (bp.len) { - av_bprint_finalize(&bp, NULL); + if (bp.len) av_dict_set(&ds->decoder_opts, "side_data_prefer_packet", bp.str, AV_DICT_APPEND); - } + av_bprint_finalize(&bp, NULL); /* Attached pics are sparse, therefore we would not want to delay their decoding * till EOF. */