[FFmpeg-cvslog] r24745 - trunk/libavcodec/atrac3.c

vitor subversion
Mon Aug 9 09:17:02 CEST 2010


Author: vitor
Date: Mon Aug  9 09:17:01 2010
New Revision: 24745

Log:
Fix handling of truncated files. Should fix random FATE breakages.

Modified:
   trunk/libavcodec/atrac3.c

Modified: trunk/libavcodec/atrac3.c
==============================================================================
--- trunk/libavcodec/atrac3.c	Sun Aug  8 10:51:15 2010	(r24744)
+++ trunk/libavcodec/atrac3.c	Mon Aug  9 09:17:01 2010	(r24745)
@@ -827,8 +827,12 @@ static int atrac3_decode_frame(AVCodecCo
     const uint8_t* databuf;
     int16_t* samples = data;
 
-    if (buf_size < avctx->block_align)
+    if (buf_size < avctx->block_align) {
+        av_log(avctx, AV_LOG_ERROR,
+               "Frame too small (%d bytes). Truncated file?\n", buf_size);
+        *data_size = 0;
         return buf_size;
+    }
 
     /* Check if we need to descramble and what buffer to pass on. */
     if (q->scrambled_stream) {



More information about the ffmpeg-cvslog mailing list