aboutsummaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorCarl Eugen Hoyos2011-03-21 12:04:10 +0100
committerCarl Eugen Hoyos2011-03-21 12:08:05 +0100
commit88f8805f3ef3c83af8f80f03f159480d0c8cab4b (patch)
tree4a9246f5d6f2306cd96c3e806f66ffbb51405c75 /libavformat
parentd4a50a2100a2b3539d238e64af98e16f47b47a89 (diff)
Allow demuxing of APE files with metadata tags.
Fixes ticket 11.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/ape.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 456407cb46..eb10f4538c 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -159,8 +159,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
int total_blocks;
int64_t pts;
- /* TODO: Skip any leading junk such as id3v2 tags */
- ape->junklength = 0;
+ /* Skip any leading junk such as id3v2 tags */
+ ape->junklength = avio_tell(pb);
tag = avio_rl32(pb);
if (tag != MKTAG('M', 'A', 'C', ' '))
@@ -271,7 +271,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
ape->frames[0].nblocks = ape->blocksperframe;
ape->frames[0].skip = 0;
for (i = 1; i < ape->totalframes; i++) {
- ape->frames[i].pos = ape->seektable[i]; //ape->frames[i-1].pos + ape->blocksperframe;
+ ape->frames[i].pos = ape->seektable[i] + ape->junklength; //ape->frames[i-1].pos + ape->blocksperframe;
ape->frames[i].nblocks = ape->blocksperframe;
ape->frames[i - 1].size = ape->frames[i].pos - ape->frames[i - 1].pos;
ape->frames[i].skip = (ape->frames[i].pos - ape->frames[0].pos) & 3;