mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-30 20:16:42 +08:00
lavc: use get_bitsz to simplify the code
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -318,7 +318,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
|
||||
|
||||
slice_address_length = av_ceil_log2_c(ps->sps->ctb_width *
|
||||
ps->sps->ctb_height);
|
||||
sh->slice_segment_addr = slice_address_length ? get_bits(gb, slice_address_length) : 0;
|
||||
sh->slice_segment_addr = get_bitsz(gb, slice_address_length);
|
||||
if (sh->slice_segment_addr >= ps->sps->ctb_width * ps->sps->ctb_height) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid slice segment address: %u.\n",
|
||||
sh->slice_segment_addr);
|
||||
|
||||
Reference in New Issue
Block a user