Browse Source

Define FLAC_MIN_FRAME_SIZE and use it in the FLAC decoder.

Patch by Michael Chinen [mchinen at gmail]

Originally committed as revision 25916 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Michael Chinen Justin Ruggles 15 years ago
parent
commit
a4151444bd
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      libavcodec/flac.h
  2. +1
    -1
      libavcodec/flacdec.c

+ 1
- 0
libavcodec/flac.h View File

@@ -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,


+ 1
- 1
libavcodec/flacdec.c View File

@@ -566,7 +566,7 @@ static int flac_decode_frame(AVCodecContext *avctx,
/* 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 */


Loading…
Cancel
Save