You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
diracdec: Fix FPE on invalid low_delay data
This commit is contained in:
committed by
Rostislav Pehlivanov
parent
cdf8c9038d
commit
3652dd5d0c
@@ -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)
|
if (s->version.minor == 2 && parse_code == 0x88)
|
||||||
s->ld_picture = 1;
|
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)
|
if ((ret = get_buffer_with_edge(avctx, pic->avframe, (parse_code & 0x0C) == 0x0C ? AV_GET_BUFFER_FLAG_REF : 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
s->current_picture = pic;
|
s->current_picture = pic;
|
||||||
|
Reference in New Issue
Block a user