Commit ee13d847 authored by Dale Curtis's avatar Dale Curtis Committed by 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: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bce8fc07)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 78782ca6
...@@ -708,8 +708,10 @@ static int ogg_read_header(AVFormatContext *s) ...@@ -708,8 +708,10 @@ static int ogg_read_header(AVFormatContext *s)
"Headers mismatch for stream %d: " "Headers mismatch for stream %d: "
"expected %d received %d.\n", "expected %d received %d.\n",
i, os->codec->nb_header, os->nb_header); 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; return AVERROR_INVALIDDATA;
}
} }
if (os->start_granule != OGG_NOGRANULE_VALUE) if (os->start_granule != OGG_NOGRANULE_VALUE)
os->lastpts = s->streams[i]->start_time = os->lastpts = s->streams[i]->start_time =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment