X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fhevc.c;h=c245d3b7e9feaffcede81aec3b0d6a53317b9f68;hb=5889bc16a4f62cd1d548acafbd446e87401cd5f8;hp=33c6ee2d62513bf60226033252a688d1715a20c9;hpb=69ead86027d04e8f1dacd7b63eb936f62a8e0c6a;p=ffmpeg diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 33c6ee2d625..c245d3b7e9f 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -469,7 +469,7 @@ static int hls_slice_header(HEVCContext *s) slice_address_length = av_ceil_log2(s->ps.sps->ctb_width * s->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 >= s->ps.sps->ctb_width * s->ps.sps->ctb_height) { av_log(s->avctx, AV_LOG_ERROR, "Invalid slice segment address: %u.\n",