aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-06-22 20:48:40 +0200
committerAnton Khirnov <anton@khirnov.net>2012-06-26 19:05:24 +0200
commitce0a975689068f2fe70f43797ca6e8b4f6b52a4c (patch)
tree5c59f7c2031b5d7fd4901ea09b9c3fd363b4d4f0
parentacd9948e74b942b21de465aad18825085d8887e5 (diff)
downloadffmpeg-ce0a975689068f2fe70f43797ca6e8b4f6b52a4c.tar.gz
mpc8: read APE tags.
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavformat/mpc8.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index f3f0372f8e..bf219c2581 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -150,7 +150,7 @@ OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
-OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o
+OBJS-$(CONFIG_MPC8_DEMUXER) += mpc8.o apetag.o
OBJS-$(CONFIG_MPEG1SYSTEM_MUXER) += mpegenc.o
OBJS-$(CONFIG_MPEG1VCD_MUXER) += mpegenc.o
OBJS-$(CONFIG_MPEG2DVD_MUXER) += mpegenc.o
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 890404faf4..93848f4ebf 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
+#include "apetag.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
@@ -240,6 +241,12 @@ static int mpc8_read_header(AVFormatContext *s)
st->duration = c->samples / (1152 << (st->codec->extradata[1]&3)*2);
size -= avio_tell(pb) - pos;
+ if (pb->seekable) {
+ int64_t pos = avio_tell(s->pb);
+ ff_ape_parse_tag(s);
+ avio_seek(s->pb, pos, SEEK_SET);
+ }
+
return 0;
}