Revision 6612d8cf libavformat/tta.c

View differences:

libavformat/tta.c
21 21

  
22 22
#include "libavcodec/get_bits.h"
23 23
#include "avformat.h"
24
#include "id3v2.h"
25 24
#include "id3v1.h"
26 25

  
27 26
typedef struct {
......
32 31
{
33 32
    const uint8_t *d = p->buf;
34 33

  
35
    if (ff_id3v2_match(d, ID3v2_DEFAULT_MAGIC))
36
        d += ff_id3v2_tag_len(d);
37

  
38
    if (d - p->buf >= p->buf_size)
39
        return 0;
40

  
41 34
    if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
42 35
        return 80;
43 36
    return 0;
......
50 43
    int i, channels, bps, samplerate, datalen, framelen;
51 44
    uint64_t framepos, start_offset;
52 45

  
53
    ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC);
54 46
    if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
55 47
        ff_id3v1_read(s);
56 48

  

Also available in: Unified diff