]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparsevorbis.c
avformat/lrcdec: Fix memory leak in lrc_read_header()
[ffmpeg] / libavformat / oggparsevorbis.c
index 65b1998a02d92d0fcaeb740d8f4523641502dbea..29b1ab514e642c907aa894aef92600dc9093aec7 100644 (file)
@@ -317,7 +317,7 @@ static int vorbis_header(AVFormatContext *s, int idx)
     if (priv->packet[pkt_type >> 1])
         return AVERROR_INVALIDDATA;
     if (pkt_type > 1 && !priv->packet[0] || pkt_type > 3 && !priv->packet[1])
-        return AVERROR_INVALIDDATA;
+        return priv->vp ? 0 : AVERROR_INVALIDDATA;
 
     priv->len[pkt_type >> 1]    = os->psize;
     priv->packet[pkt_type >> 1] = av_mallocz(os->psize);