avformat/matroskadec: Do not leak queued packets on sync errors
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 6 Feb 2019 14:29:38 +0000 (15:29 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 17 Feb 2019 08:12:06 +0000 (09:12 +0100)
Fixes: memleak
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280

Reported-by: Chris Cunningham <chcunningham@google.com>
Tested-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/matroskadec.c

index 4ad99db..d7881d9 100644 (file)
@@ -3541,7 +3541,7 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
             ret = matroska_resync(matroska, pos);
     }
 
-    return ret;
+    return 0;
 }
 
 static int matroska_read_seek(AVFormatContext *s, int stream_index,