[FFmpeg-cvslog] avcodec/hevc_ps: Change num_tile_rows/columns checks to sps->ctb_height/weight

Michael Niedermayer git at videolan.org
Sun Jun 30 19:48:56 EEST 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 25 10:29:57 2019 +0200| [3b2082c663dac93fd722289a540c1b1e24a12564] | committer: Michael Niedermayer

avcodec/hevc_ps: Change num_tile_rows/columns checks to sps->ctb_height/weight

Suggested-by: James Almer <jamrial at gmail.com>
Reviewed-by: James Almer <jamrial at gmail.com
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b2082c663dac93fd722289a540c1b1e24a12564
---

 libavcodec/hevc_ps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 07d220a5c8..f6e80e1609 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->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;



More information about the ffmpeg-cvslog mailing list