mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/hevc_ps: Change num_tile_rows/columns checks to sps->ctb_height/weight
Suggested-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3b2082c663dac93fd722289a540c1b1e24a12564) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5aed312d73
commit
864190828c
@ -1585,14 +1585,14 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
|
||||
int num_tile_rows_minus1 = get_ue_golomb(gb);
|
||||
|
||||
if (num_tile_columns_minus1 < 0 ||
|
||||
num_tile_columns_minus1 >= sps->width - 1) {
|
||||
num_tile_columns_minus1 >= sps->ctb_width - 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n",
|
||||
num_tile_columns_minus1);
|
||||
ret = num_tile_columns_minus1 < 0 ? num_tile_columns_minus1 : AVERROR_INVALIDDATA;
|
||||
goto err;
|
||||
}
|
||||
if (num_tile_rows_minus1 < 0 ||
|
||||
num_tile_rows_minus1 >= sps->height - 1) {
|
||||
num_tile_rows_minus1 >= sps->ctb_height - 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "num_tile_rows_minus1 out of range: %d\n",
|
||||
num_tile_rows_minus1);
|
||||
ret = num_tile_rows_minus1 < 0 ? num_tile_rows_minus1 : AVERROR_INVALIDDATA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user