mpc8: read APE tags.

This commit is contained in:
Anton Khirnov 2012-06-22 20:48:40 +02:00
parent acd9948e74
commit ce0a975689
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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;
}