Browse Source

tta: read ape tags last

Otherwise, cover art will create video stream with index 0.
Fixes #2677.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.0
Paul B Mahol 12 years ago
parent
commit
9ea7ff7955
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      libavformat/tta.c

+ 6
- 5
libavformat/tta.c View File

@@ -60,11 +60,6 @@ static int tta_read_header(AVFormatContext *s)
uint32_t nb_samples, crc; uint32_t nb_samples, crc;


ff_id3v1_read(s); ff_id3v1_read(s);
if (s->pb->seekable) {
int64_t pos = avio_tell(s->pb);
ff_ape_parse_tag(s);
avio_seek(s->pb, pos, SEEK_SET);
}


start_offset = avio_tell(s->pb); start_offset = avio_tell(s->pb);
ffio_init_checksum(s->pb, tta_check_crc, UINT32_MAX); ffio_init_checksum(s->pb, tta_check_crc, UINT32_MAX);
@@ -143,6 +138,12 @@ static int tta_read_header(AVFormatContext *s)
st->codec->sample_rate = samplerate; st->codec->sample_rate = samplerate;
st->codec->bits_per_coded_sample = bps; st->codec->bits_per_coded_sample = bps;


if (s->pb->seekable) {
int64_t pos = avio_tell(s->pb);
ff_ape_parse_tag(s);
avio_seek(s->pb, pos, SEEK_SET);
}

return 0; return 0;
} }




Loading…
Cancel
Save