[FFmpeg-cvslog] mpc8: read APE tags.
Anton Khirnov
git at videolan.org
Wed Jun 27 02:07:40 CEST 2012
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Jun 22 20:48:40 2012 +0200| [ce0a975689068f2fe70f43797ca6e8b4f6b52a4c] | committer: Anton Khirnov
mpc8: read APE tags.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce0a975689068f2fe70f43797ca6e8b4f6b52a4c
---
libavformat/Makefile | 2 +-
libavformat/mpc8.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavformat/Makefile b/libavformat/Makefile
index f3f0372..bf219c2 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 890404f..93848f4 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;
}
More information about the ffmpeg-cvslog
mailing list