[FFmpeg-cvslog] tta: read ape tags last
Paul B Mahol
git at videolan.org
Sun Jun 16 20:58:04 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 16 18:46:35 2013 +0000| [9ea7ff7955192c38ac277a19920a96deed510be1] | committer: Paul B Mahol
tta: read ape tags last
Otherwise, cover art will create video stream with index 0.
Fixes #2677.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ea7ff7955192c38ac277a19920a96deed510be1
---
libavformat/tta.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavformat/tta.c b/libavformat/tta.c
index dec86c0..bbb6a22 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -60,11 +60,6 @@ static int tta_read_header(AVFormatContext *s)
uint32_t nb_samples, crc;
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);
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->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;
}
More information about the ffmpeg-cvslog
mailing list