diff movenc.c @ 1151:bf808f3f7f46 libavformat

check for unparsed AMR input
author michael
date Thu, 06 Jul 2006 12:27:43 +0000
parents c8edab114cc3
children c7cf3d1f9bd7
line wrap: on
line diff
--- a/movenc.c	Thu Jul 06 12:17:01 2006 +0000
+++ b/movenc.c	Thu Jul 06 12:27:43 2006 +0000
@@ -1532,6 +1532,10 @@
             len += packed_size[(pkt->data[len] >> 3) & 0x0F];
             samplesInChunk++;
         }
+        if(samplesInChunk > 1){
+            av_log(s, AV_LOG_ERROR, "fatal error, input is not a single packet, inplement a AVParser for it\n");
+            return -1;
+        }
     } else if (trk->sampleSize)
         samplesInChunk = size/trk->sampleSize;
     else