[FFmpeg-cvslog] aiff: Skip padding byte for odd-sized chunks

Diego Biurrun git at videolan.org
Fri Mar 17 13:47:40 EET 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Aug  8 21:06:03 2016 +0200| [0638b99cdba52554691fc668d9e477bc184c7a33] | committer: Diego Biurrun

aiff: Skip padding byte for odd-sized chunks

Bug-Id: 660

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0638b99cdba52554691fc668d9e477bc184c7a33
---

 libavformat/aiffdec.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index e563909..3c45c61 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -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:



More information about the ffmpeg-cvslog mailing list