Revision 045b80e5

View differences:

libavcodec/mpegaudiodec.c
27 27
#include "avcodec.h"
28 28
#include "get_bits.h"
29 29
#include "dsputil.h"
30
#include "libavformat/id3v1.h"
31 30

  
32 31
/*
33 32
 * TODO:
......
2044 2043

  
2045 2044
    header = AV_RB32(buf);
2046 2045
    if(ff_mpa_check_header(header) < 0){
2047

  
2048
        if (buf_size == ID3v1_TAG_SIZE
2049
            && buf[0] == 'T' && buf[1] == 'A' && buf[2] == 'G') {
2050
            *data_size = 0;
2051
            return ID3v1_TAG_SIZE;
2052
        }
2053

  
2054 2046
        av_log(avctx, AV_LOG_ERROR, "Header missing\n");
2055 2047
        return -1;
2056 2048
    }
libavformat/mp3dec.c
174 174
    if (ret <= 0) {
175 175
        return AVERROR(EIO);
176 176
    }
177

  
178
    if (ret > ID3v1_TAG_SIZE &&
179
        memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) == 0)
180
        ret -= ID3v1_TAG_SIZE;
181

  
177 182
    /* note: we need to modify the packet size here to handle the last
178 183
       packet */
179 184
    pkt->size = ret;

Also available in: Unified diff