aiff: Skip padding byte for odd-sized chunks
authorDiego Biurrun <diego@biurrun.de>
Mon, 8 Aug 2016 19:06:03 +0000 (21:06 +0200)
committerDiego Biurrun <diego@biurrun.de>
Wed, 10 Aug 2016 09:58:38 +0000 (11:58 +0200)
Bug-Id: 660

libavformat/aiffdec.c

index e563909..3c45c61 100644 (file)
@@ -267,10 +267,14 @@ static int aiff_read_header(AVFormatContext *s)
             avio_read(pb, st->codecpar->extradata, size);
             break;
         default: /* Jump */
-            if (size & 1)   /* Always even aligned */
-                size++;
             avio_skip(pb, size);
         }
+
+        /* Skip required padding byte for odd-sized chunks. */
+        if (size & 1) {
+            filesize--;
+            avio_skip(pb, 1);
+        }
     }
 
 got_sound: