[FFmpeg-cvslog] r17751 - trunk/libavcodec/flacdec.c

jbr subversion
Tue Mar 3 06:53:38 CET 2009


Author: jbr
Date: Tue Mar  3 06:53:38 2009
New Revision: 17751

Log:
flacdec: Warn about invalid max blocksize and limit the minimum value.

Modified:
   trunk/libavcodec/flacdec.c

Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c	Tue Mar  3 06:26:39 2009	(r17750)
+++ trunk/libavcodec/flacdec.c	Tue Mar  3 06:53:38 2009	(r17751)
@@ -187,6 +187,11 @@ void ff_flac_parse_streaminfo(AVCodecCon
 
     skip_bits(&gb, 16); /* skip min blocksize */
     s->max_blocksize = get_bits(&gb, 16);
+    if (s->max_blocksize < 16) {
+        av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n",
+               s->max_blocksize);
+        s->max_blocksize = 16;
+    }
 
     skip_bits(&gb, 24); /* skip min frame size */
     s->max_framesize = get_bits_long(&gb, 24);




More information about the ffmpeg-cvslog mailing list