aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-10 21:10:18 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-12 01:52:14 +0200
commite952d4b7ace607132130599905c75f25aaea9e56 (patch)
tree5a6c790c2170c2d12d8b75620ee650e7f42ca313
parentabf3f9fa232409c00b60041464604a91fa5612c0 (diff)
downloadffmpeg-e952d4b7ace607132130599905c75f25aaea9e56.tar.gz
avcodec/hevc_ps: Fix limit of chroma_qp_offset_list_len_minus1
A value of 5 is allowed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/hevc_ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index eb104ca1b9..500fee03d8 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1302,7 +1302,7 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx,
if (pps->chroma_qp_offset_list_enabled_flag) {
pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb);
pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb);
- if (pps->chroma_qp_offset_list_len_minus1 && pps->chroma_qp_offset_list_len_minus1 >= 5) {
+ if (pps->chroma_qp_offset_list_len_minus1 > 5) {
av_log(avctx, AV_LOG_ERROR,
"chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n");
return AVERROR_INVALIDDATA;