avformat/aiffdec: Stop header parsing once a non header packet is reached
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 19 Mar 2015 00:39:47 +0000 (01:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 19 Mar 2015 00:39:47 +0000 (01:39 +0100)
Fix Ticket3530

Based-on debuging work by Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/aiffdec.c

index bc1a219..a5ad6cf 100644 (file)
@@ -306,6 +306,9 @@ static int aiff_read_header(AVFormatContext *s)
             if(ff_mov_read_chan(s, pb, st, size) < 0)
                 return AVERROR_INVALIDDATA;
             break;
+        case 0:
+            if (offset > 0 && st->codec->block_align) // COMM && SSND
+                goto got_sound;
         default: /* Jump */
             if (size & 1)   /* Always even aligned */
                 size++;