[SCM] libav/experimental: Skip short padding in id3v2.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:12:56 UTC 2013


The following commit has been merged in the experimental branch:
commit ff58de29f1361789b6fc9c35a633e9e706172e09
Author: Alexander Kojevnikov <alexander at kojevnikov.com>
Date:   Wed Jul 28 08:06:52 2010 +0000

    Skip short padding in id3v2.
    
    Patch by Alexander Kojevnikov, alexander kojevnikov com
    
    Originally committed as revision 24567 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 7e4a16f..1f513d9 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -217,13 +217,17 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
         else if (!tag[0]) {
             if (tag[1])
                 av_log(s, AV_LOG_WARNING, "invalid frame id, assuming padding");
-            url_fskip(s->pb, len);
+            url_fskip(s->pb, tlen);
             break;
         }
         /* Skip to end of tag */
         url_fseek(s->pb, next, SEEK_SET);
     }
 
+    if (len > 0) {
+        /* Skip padding */
+        url_fskip(s->pb, len);
+    }
     if (version == 4 && flags & 0x10) /* Footer preset, always 10 bytes, skip over it */
         url_fskip(s->pb, 10);
     return;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list