diff options
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index ab6aabe0b5..c06969b058 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -174,6 +174,11 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt) if (ret <= 0) { return AVERROR(EIO); } + + if (ret > ID3v1_TAG_SIZE && + memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) == 0) + ret -= ID3v1_TAG_SIZE; + /* note: we need to modify the packet size here to handle the last packet */ pkt->size = ret; |