[FFmpeg-cvslog] ape: Allow demuxing of files with metadata tags.
Carl Eugen Hoyos
git at videolan.org
Wed May 25 06:37:11 CEST 2011
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon Mar 21 12:04:10 2011 +0100| [ab088f7d2842b9c658a8906062a96be37fbc9981] | committer: Anton Khirnov
ape: Allow demuxing of files with metadata tags.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab088f7d2842b9c658a8906062a96be37fbc9981
---
libavformat/ape.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 956036d..0bc7737 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', ' '))
@@ -276,7 +276,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].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;
More information about the ffmpeg-cvslog
mailing list