summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-14 15:20:09 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-29 05:11:54 +0200
commitcbb6ba2e86923349ff9c5602976bb02ffa9d3fff (patch)
treee5bee7cbe6e680cec6c9b4c29ce5feb99db4bcbe /libavcodec/cavsdec.c
parent2d5407d390728d4d4a4d8f36a8fe69ff490f54e4 (diff)
downloadffmpeg-cbb6ba2e86923349ff9c5602976bb02ffa9d3fff.tar.gz
avcodec/cavsdec, h264*, hevc_parser: Use get_ue_golomb_31 where possible
instead of get_ue_golomb(). The difference between the two is that the latter also has to take into account the case in which the read code is more than 9 bits (four preceding zeroes + at most five value bits) long, leading to more code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index aaed807196..9c3825df38 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -676,7 +676,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code)
}
h->pred_mode_Y[pos] = predpred;
}
- pred_mode_uv = get_ue_golomb(gb);
+ pred_mode_uv = get_ue_golomb_31(gb);
if (pred_mode_uv > 6) {
av_log(h->avctx, AV_LOG_ERROR, "illegal intra chroma pred mode\n");
return AVERROR_INVALIDDATA;