mp3demux: fix off by 1 error
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 8 May 2012 01:45:17 +0000 (03:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 May 2012 01:45:17 +0000 (03:45 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mp3dec.c

index edfee16..8d92aec 100644 (file)
@@ -183,7 +183,7 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
         return AVERROR_EOF;
     }
 
-    if (ret > ID3v1_TAG_SIZE &&
+    if (ret >= ID3v1_TAG_SIZE &&
         memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) == 0)
         ret -= ID3v1_TAG_SIZE;