changeset 6333:f5fec1ab4925 libavformat

Skip short padding in id3v2. Patch by Alexander Kojevnikov, alexander kojevnikov com
author cehoyos
date Wed, 28 Jul 2010 08:06:52 +0000
parents 2f14ee83c673
children 67c36f475c54
files id3v2.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/id3v2.c	Wed Jul 28 06:43:58 2010 +0000
+++ b/id3v2.c	Wed Jul 28 08:06:52 2010 +0000
@@ -217,13 +217,17 @@
         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;