summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-06-30 17:32:44 -0300
committerJames Almer <jamrial@gmail.com>2019-07-05 16:30:40 -0300
commit7c644989a5c27793331a14ee0f433ca177a0ffae (patch)
tree5135976db2d1ddf11cadcca07c0a2e222d1a7642 /libavcodec/hevc_ps.c
parent0cbdedbd2fc2211d0477c32c30f12e7aad4443de (diff)
downloadffmpeg-streaming-7c644989a5c27793331a14ee0f433ca177a0ffae.zip
ffmpeg-streaming-7c644989a5c27793331a14ee0f433ca177a0ffae.tar.gz
avcodec/hevc_ps: fix range of num_tile_{columns,rows}_minus1
From 7.4.3.3.1: num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, inclusive. num_tile_rows_minus1 shall be in the range of 0 to PicHeightInCtbsY - 1, inclusive. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index f6e80e1..abf08b9 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1588,14 +1588,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->ctb_width - 1) {
+ num_tile_columns_minus1 >= sps->ctb_width) {
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->ctb_height - 1) {
+ num_tile_rows_minus1 >= sps->ctb_height) {
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;
OpenPOWER on IntegriCloud