diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-14 15:20:09 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-29 05:11:54 +0200 |
commit | cbb6ba2e86923349ff9c5602976bb02ffa9d3fff (patch) | |
tree | e5bee7cbe6e680cec6c9b4c29ce5feb99db4bcbe /libavcodec/hevc_parser.c | |
parent | 2d5407d390728d4d4a4d8f36a8fe69ff490f54e4 (diff) | |
download | ffmpeg-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/hevc_parser.c')
-rw-r--r-- | libavcodec/hevc_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c index 5af4b788d5..463d352055 100644 --- a/libavcodec/hevc_parser.c +++ b/libavcodec/hevc_parser.c @@ -136,7 +136,7 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, for (i = 0; i < ps->pps->num_extra_slice_header_bits; i++) skip_bits(gb, 1); // slice_reserved_undetermined_flag[] - slice_type = get_ue_golomb(gb); + slice_type = get_ue_golomb_31(gb); if (!(slice_type == HEVC_SLICE_I || slice_type == HEVC_SLICE_P || slice_type == HEVC_SLICE_B)) { av_log(avctx, AV_LOG_ERROR, "Unknown slice type: %d.\n", |