summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-03 01:19:23 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-03 21:12:53 +0100
commit43ff4aed26cba2cce230972add631ab938d33b30 (patch)
tree55e3e95735f6946b852d3bb97ae5ae7c4722760a /libavcodec/hevc_parser.c
parent713654d9d3a6931a9b4cd0cffa4bb61cd1357977 (diff)
lavc: use get_bitsz to simplify the code
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index fc107978c6..4625e6149a 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -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);