diff options
author | Kieran Kunhya <kierank@ob-encoder.com> | 2015-12-09 00:56:02 +0000 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-12-10 22:14:03 +0000 |
commit | 3652dd5d0ceef6281d86fbd68aa7b5552f59bb1f (patch) | |
tree | b654bea733a6ae3ce619770e2b18a86e0dbd2c86 /libavcodec/diracdec.c | |
parent | cdf8c9038ddb4a655661460896e8ba8046deb0a2 (diff) | |
download | ffmpeg-3652dd5d0ceef6281d86fbd68aa7b5552f59bb1f.tar.gz |
diracdec: Fix FPE on invalid low_delay data
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r-- | libavcodec/diracdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 2d076a55ab..6e5fe9f45e 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -2002,6 +2002,11 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int if (s->version.minor == 2 && parse_code == 0x88) s->ld_picture = 1; + if (s->low_delay && !(s->ld_picture || s->hq_picture) ) { + av_log(avctx, AV_LOG_ERROR, "Invalid low delay flag\n"); + return AVERROR_INVALIDDATA; + } + if ((ret = get_buffer_with_edge(avctx, pic->avframe, (parse_code & 0x0C) == 0x0C ? AV_GET_BUFFER_FLAG_REF : 0)) < 0) return ret; s->current_picture = pic; |