[FFmpeg-cvslog] r12891 - trunk/libavcodec/alac.c

benoit subversion
Fri Apr 18 10:58:18 CEST 2008


Author: benoit
Date: Fri Apr 18 10:58:18 2008
New Revision: 12891

Log:
check alac EOF marker
Patch by Matthieu Castet castet matthieu free fr


Modified:
   trunk/libavcodec/alac.c

Modified: trunk/libavcodec/alac.c
==============================================================================
--- trunk/libavcodec/alac.c	(original)
+++ trunk/libavcodec/alac.c	Fri Apr 18 10:58:18 2008
@@ -548,6 +548,8 @@ static int alac_decode_frame(AVCodecCont
         interlacing_shift = 0;
         interlacing_leftweight = 0;
     }
+    if (get_bits(&alac->gb, 3) != 7)
+        av_log(avctx, AV_LOG_ERROR, "Error : Wrong End Of Frame\n");
 
     switch(alac->setinfo_sample_size) {
     case 16:
@@ -577,6 +579,9 @@ static int alac_decode_frame(AVCodecCont
         break;
     }
 
+    if (input_buffer_size * 8 - get_bits_count(&alac->gb) > 8)
+        av_log(avctx, AV_LOG_ERROR, "Error : %d bits left\n", input_buffer_size * 8 - get_bits_count(&alac->gb));
+
     return input_buffer_size;
 }
 




More information about the ffmpeg-cvslog mailing list