mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-04 18:09:20 +00:00
libavformat/flvdec.c: free always the packet after a resync.
In case of resync, always free the packet, but retry only if the resync did not get to the end of the file. Otherwise, there is a memory leak when the last packet in the file is corrupted. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1d0487f77f
commit
7f72f2d75e
@ -1142,8 +1142,8 @@ leave:
|
||||
av_log(s, AV_LOG_ERROR, "Packet mismatch %d %d\n", last, orig_size + 11);
|
||||
avio_seek(s->pb, pos + 1, SEEK_SET);
|
||||
ret = resync(s);
|
||||
av_free_packet(pkt);
|
||||
if (ret >= 0) {
|
||||
av_free_packet(pkt);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user