mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
diracdec: fix empty data units.
Fixed Ticket636 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
07c7ffc04b
commit
6718536ba5
@ -1836,7 +1836,8 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
data_unit_size = AV_RB32(buf+buf_idx+5);
|
data_unit_size = AV_RB32(buf+buf_idx+5);
|
||||||
if (buf_idx + data_unit_size > buf_size) {
|
if (buf_idx + data_unit_size > buf_size || !data_unit_size) {
|
||||||
|
if(buf_idx + data_unit_size > buf_size)
|
||||||
av_log(s->avctx, AV_LOG_ERROR,
|
av_log(s->avctx, AV_LOG_ERROR,
|
||||||
"Data unit with size %d is larger than input buffer, discarding\n",
|
"Data unit with size %d is larger than input buffer, discarding\n",
|
||||||
data_unit_size);
|
data_unit_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user