diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-06-22 13:08:08 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-06-24 07:55:33 +0200 |
commit | 980e65f11994c3659451feb170bff085731693c2 (patch) | |
tree | b69c3bad1601b371e422c845fe528cf0216a1335 | |
parent | a7b8ff94b19732012549c745e2be3a4b1e2cb872 (diff) | |
download | ffmpeg-980e65f11994c3659451feb170bff085731693c2.tar.gz |
ape: create audio stream before reading tags.
Tags may contain attached picture, which will be exported as video
streams.
This ensures that the audio stream is always the first.
-rw-r--r-- | libavformat/ape.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index b3fca23db5..76ad549117 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -312,12 +312,6 @@ static int ape_read_header(AVFormatContext * s) ape_dumpinfo(s, ape); - /* try to read APE tags */ - if (pb->seekable) { - ff_ape_parse_tag(s); - avio_seek(pb, 0, SEEK_SET); - } - av_log(s, AV_LOG_DEBUG, "Decoding file - v%d.%02d, compression level %"PRIu16"\n", ape->fileversion / 1000, (ape->fileversion % 1000) / 10, ape->compressiontype); @@ -354,6 +348,12 @@ static int ape_read_header(AVFormatContext * s) pts += ape->blocksperframe / MAC_SUBFRAME_SIZE; } + /* try to read APE tags */ + if (pb->seekable) { + ff_ape_parse_tag(s); + avio_seek(pb, 0, SEEK_SET); + } + return 0; } |