Commit 08c38593dc for ffmpeg
commit 08c38593dc5e7c7c6baa5853417cbe9b62a41ffd
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Fri Dec 4 18:41:48 2026 +0100
avformat/dashdec: restore the representations after a mismatched refresh
A refresh that found another number of representations returned without
putting back the lists it had replaced. The open representations leaked,
and the new ones, which have no streams, were read from their first
segment in their place.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 1681fa2487..d0b098f5fc 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1666,19 +1666,22 @@ static int refresh_manifest(AVFormatContext *s)
av_log(c, AV_LOG_ERROR,
"new manifest has mismatched no. of video representations, %d -> %d\n",
n_videos, c->n_videos);
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ goto finish;
}
if (c->n_audios != n_audios) {
av_log(c, AV_LOG_ERROR,
"new manifest has mismatched no. of audio representations, %d -> %d\n",
n_audios, c->n_audios);
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ goto finish;
}
if (c->n_subtitles != n_subtitles) {
av_log(c, AV_LOG_ERROR,
"new manifest has mismatched no. of subtitles representations, %d -> %d\n",
n_subtitles, c->n_subtitles);
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ goto finish;
}
for (i = 0; i < n_videos; i++) {