mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 21:45:10 +00:00
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.
This commit is contained in:
parent
a7b8ff94b1
commit
980e65f119
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user