diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 16d25e9cd6..a59c07d34a 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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; } }