mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/wtvdec: Fix memleak when reading header fails
Fixes #8314. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 373c1c9b691fd4c6831b3a114a006b639304c2af) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
4e9ecae171
commit
8d20be08ef
@ -993,8 +993,10 @@ static int read_header(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = parse_chunks(s, SEEK_TO_DATA, 0, 0);
|
ret = parse_chunks(s, SEEK_TO_DATA, 0, 0);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
wtvfile_close(wtv->pb);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
avio_seek(wtv->pb, -32, SEEK_CUR);
|
avio_seek(wtv->pb, -32, SEEK_CUR);
|
||||||
|
|
||||||
timeline_pos = avio_tell(s->pb); // save before opening another file
|
timeline_pos = avio_tell(s->pb); // save before opening another file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user