Commit 373c1c9b authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by James Almer

avformat/wtvdec: Fix memleak when reading header fails

Fixes #8314.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: 's avatarPeter Ross <pross@xvid.org>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent dce2e065
......@@ -993,8 +993,10 @@ static int read_header(AVFormatContext *s)
}
ret = parse_chunks(s, SEEK_TO_DATA, 0, 0);
if (ret < 0)
if (ret < 0) {
wtvfile_close(wtv->pb);
return ret;
}
avio_seek(wtv->pb, -32, SEEK_CUR);
timeline_pos = avio_tell(s->pb); // save before opening another file
......
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