Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2017-11-20 23:07:57 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-11-21 05:13:03 +0300
commitbce8fc0754c4b31f574a4372c6d7996ed29f7c2a (patch)
treeaf790673e46dcefaf56196568386d7c42ce21af1 /libavformat/oggdec.c
parent7010dd98b575d2e39fca947e609b85be7490b269 (diff)
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@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c4
1 files changed, 3 insertions, 1 deletions
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 =