Commit 7f72f2d7 authored by Thierry Foucu's avatar Thierry Foucu Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1d0487f7
......@@ -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);
if (ret >= 0) {
av_free_packet(pkt);
if (ret >= 0) {
goto retry;
}
}
......
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