Commit cc4cb200c6 for ffmpeg
commit cc4cb200c68448b22f13de3b49de7c37d10f04a9
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Tue Sep 29 11:34:18 2026 +0200
avformat/dashdec: free the old IO buffer when reopening a representation
After a failed reopen it is still there without a demuxer context, so
close_demux_for_component() does not free it.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 740ac6bc1c..2ce6fe6c56 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1964,6 +1964,7 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation
pls->ctx = NULL;
goto fail;
}
+ av_freep(&pls->pb.pub.buffer);
ffio_init_context(&pls->pb, avio_ctx_buffer, INITIAL_BUFFER_SIZE, 0,
pls, read_data, NULL, c->is_live ? NULL : seek_data);
pls->pb.pub.seekable = 0;