[FFmpeg-devel] [PATCH] aiffdec: read ID3 attached pictures

Matthieu Bouron matthieu.bouron at gmail.com
Thu Oct 25 22:45:33 CEST 2012


---
 libavformat/aiffdec.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 56338c0..79b7853 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -191,7 +191,7 @@ static int aiff_probe(AVProbeData *p)
 /* aiff input */
 static int aiff_read_header(AVFormatContext *s)
 {
-    int size, filesize;
+    int ret, size, filesize;
     int64_t offset = 0;
     uint32_t tag;
     unsigned version = AIFF_C_VERSION1;
@@ -237,6 +237,11 @@ static int aiff_read_header(AVFormatContext *s)
             break;
         case MKTAG('I', 'D', '3', ' '):
             ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
+            if (id3v2_extra_meta)
+                if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0) {
+                    ff_id3v2_free_extra_meta(&id3v2_extra_meta);
+                    return ret;
+                }
             ff_id3v2_free_extra_meta(&id3v2_extra_meta);
             break;
         case MKTAG('F', 'V', 'E', 'R'):     /* Version chunk */
-- 
1.7.12.4



More information about the ffmpeg-devel mailing list