[FFmpeg-cvslog] r25916 - in trunk/libavcodec: flac.h flacdec.c
jbr
subversion
Tue Dec 7 15:58:34 CET 2010
Author: jbr
Date: Tue Dec 7 15:58:34 2010
New Revision: 25916
Log:
Define FLAC_MIN_FRAME_SIZE and use it in the FLAC decoder.
Patch by Michael Chinen [mchinen at gmail]
Modified:
trunk/libavcodec/flac.h
trunk/libavcodec/flacdec.c
Modified: trunk/libavcodec/flac.h
==============================================================================
--- trunk/libavcodec/flac.h Tue Dec 7 15:57:02 2010 (r25915)
+++ trunk/libavcodec/flac.h Tue Dec 7 15:58:34 2010 (r25916)
@@ -34,6 +34,7 @@
#define FLAC_MAX_CHANNELS 8
#define FLAC_MIN_BLOCKSIZE 16
#define FLAC_MAX_BLOCKSIZE 65535
+#define FLAC_MIN_FRAME_SIZE 11
enum {
FLAC_CHMODE_INDEPENDENT = 0,
Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c Tue Dec 7 15:57:02 2010 (r25915)
+++ trunk/libavcodec/flacdec.c Tue Dec 7 15:58:34 2010 (r25916)
@@ -566,7 +566,7 @@ static int flac_decode_frame(AVCodecCont
/* check that there is at least the smallest decodable amount of data.
this amount corresponds to the smallest valid FLAC frame possible.
FF F8 69 02 00 00 9A 00 00 34 46 */
- if (buf_size < 11)
+ if (buf_size < FLAC_MIN_FRAME_SIZE)
return buf_size;
/* check for inline header */
More information about the ffmpeg-cvslog
mailing list