[FFmpeg-cvslog] Close ogg stream upon error when using AV_EF_EXPLODE.
Dale Curtis
git at videolan.org
Fri Dec 8 11:35:08 EET 2017
ffmpeg | branch: release/3.4 | Dale Curtis <dalecurtis at chromium.org> | Mon Nov 20 12:07:57 2017 -0800| [35c7a1df8ae57b7c913f656f594a87bc9e7fab0c] | committer: Michael Niedermayer
Close ogg stream upon error when using AV_EF_EXPLODE.
Without this there can be multiple memory leaks for unrecognized
ogg streams.
Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit bce8fc0754c4b31f574a4372c6d7996ed29f7c2a)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35c7a1df8ae57b7c913f656f594a87bc9e7fab0c
---
libavformat/oggdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 97ad1a27d1..193a286e43 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -719,8 +719,10 @@ static int ogg_read_header(AVFormatContext *s)
"Headers mismatch for stream %d: "
"expected %d received %d.\n",
i, os->codec->nb_header, os->nb_header);
- if (s->error_recognition & AV_EF_EXPLODE)
+ if (s->error_recognition & AV_EF_EXPLODE) {
+ ogg_read_close(s);
return AVERROR_INVALIDDATA;
+ }
}
if (os->start_granule != OGG_NOGRANULE_VALUE)
os->lastpts = s->streams[i]->start_time =
More information about the ffmpeg-cvslog
mailing list