]> git.sesse.net Git - ffmpeg/commitdiff
lavf/aacdec: add support for reading ape tags
authorPaul B Mahol <onemda@gmail.com>
Mon, 3 Jun 2013 22:16:02 +0000 (22:16 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 3 Jun 2013 23:10:57 +0000 (23:10 +0000)
Closes #2634.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/Makefile
libavformat/aacdec.c

index 69ab63b714c5fa8a20c6c70af730603971837fae..ee592a8e7ff56799c05d7475d745aaabef6363f7 100644 (file)
@@ -50,7 +50,7 @@ OBJS-$(CONFIG_SHARED)                    += log2_tab.o
 
 # muxers/demuxers
 OBJS-$(CONFIG_A64_MUXER)                 += a64.o rawenc.o
-OBJS-$(CONFIG_AAC_DEMUXER)               += aacdec.o rawdec.o
+OBJS-$(CONFIG_AAC_DEMUXER)               += aacdec.o apetag.o rawdec.o
 OBJS-$(CONFIG_AC3_DEMUXER)               += ac3dec.o rawdec.o
 OBJS-$(CONFIG_AC3_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_ACT_DEMUXER)               += act.o
index 9d7c6d711fcfd3b7be43f2e88977d60a33ac9a6b..d93e75ec52ca0c3439186c853c0395d169404cbc 100644 (file)
@@ -25,7 +25,7 @@
 #include "internal.h"
 #include "rawdec.h"
 #include "id3v1.h"
-
+#include "apetag.h"
 
 static int adts_aac_probe(AVProbeData *p)
 {
@@ -75,6 +75,12 @@ static int adts_aac_read_header(AVFormatContext *s)
     st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
 
     ff_id3v1_read(s);
+    if (s->pb->seekable &&
+        !av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
+        int64_t cur = avio_tell(s->pb);
+        ff_ape_parse_tag(s);
+        avio_seek(s->pb, cur, SEEK_SET);
+    }
 
     //LCM of all possible ADTS sample rates
     avpriv_set_pts_info(st, 64, 1, 28224000);