mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mjpegdec: print error message when quant_index is invalid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a2f680c7bc
commit
bc16031a41
@ -283,8 +283,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
s->quant_index[i] = get_bits(&s->gb, 8);
|
s->quant_index[i] = get_bits(&s->gb, 8);
|
||||||
if (s->quant_index[i] >= 4)
|
if (s->quant_index[i] >= 4) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "quant_index is invalid\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n",
|
av_log(s->avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n",
|
||||||
i, h_count[i], v_count[i],
|
i, h_count[i], v_count[i],
|
||||||
s->component_id[i], s->quant_index[i]);
|
s->component_id[i], s->quant_index[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user