summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/flac.h1
-rw-r--r--libavcodec/flacdec.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flac.h b/libavcodec/flac.h
index 7bcc1a1a9d..fcd80996dc 100644
--- a/libavcodec/flac.h
+++ b/libavcodec/flac.h
@@ -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,
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 71a2c58ea6..18ea0acd9a 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -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 */