Commit 06c70d45 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/hevc_ps: Check cropping parameters more correctly

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 665e0c10
...@@ -1039,7 +1039,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) ...@@ -1039,7 +1039,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
(sps->output_window.left_offset + sps->output_window.right_offset); (sps->output_window.left_offset + sps->output_window.right_offset);
sps->output_height = sps->height - sps->output_height = sps->height -
(sps->output_window.top_offset + sps->output_window.bottom_offset); (sps->output_window.top_offset + sps->output_window.bottom_offset);
if (sps->output_width <= 0 || sps->output_height <= 0) { if (sps->width <= sps->output_window.left_offset + (int64_t)sps->output_window.right_offset ||
sps->height <= sps->output_window.top_offset + (int64_t)sps->output_window.bottom_offset) {
av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n", av_log(s->avctx, AV_LOG_WARNING, "Invalid visible frame dimensions: %dx%d.\n",
sps->output_width, sps->output_height); sps->output_width, sps->output_height);
if (s->avctx->err_recognition & AV_EF_EXPLODE) { if (s->avctx->err_recognition & AV_EF_EXPLODE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment