[FFmpeg-devel] [PATCH 1/5] avformat/demux: Copy AVCodecContext properties in codec_close()

Marth64 marth64 at proxyid.net
Fri Jul 5 08:25:51 EEST 2024


After avformat_find_stream_info() calls codec_close(), the
properties are not copied in the newly created skeleton context
returned by codec_close(). This breaks display of the properties
when viewing stream information afterward e.g. via av_dump_format().

Copy the old properties over, thus fixing printing of the properties
(such as Closed Captions) in av_dump_format() that broke sometime
after 4.4.2.

Signed-off-by: Marth64 <marth64 at proxyid.net>
---
 libavformat/demux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index dc65f9ad91..72d4ae7593 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -1298,6 +1298,7 @@ static int codec_close(FFStream *sti)
     if (ret < 0)
         goto fail;
 
+    avctx_new->properties   = sti->avctx->properties;
     avctx_new->pkt_timebase = sti->avctx->pkt_timebase;
 
 #if FF_API_TICKS_PER_FRAME
-- 
2.34.1



More information about the ffmpeg-devel mailing list