mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-01 04:53:04 +08:00
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>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user