Replace computations of remaining bits with calls to get_bits_left().
This commit is contained in:
@@ -227,8 +227,8 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
|
||||
sps->num_reorder_frames= get_ue_golomb(&s->gb);
|
||||
get_ue_golomb(&s->gb); /*max_dec_frame_buffering*/
|
||||
|
||||
if(s->gb.size_in_bits < get_bits_count(&s->gb)){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Overread VUI by %d bits\n", get_bits_count(&s->gb) - s->gb.size_in_bits);
|
||||
if (get_bits_left(&s->gb) < 0) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Overread VUI by %d bits\n", -get_bits_left(&s->gb));
|
||||
sps->num_reorder_frames=0;
|
||||
sps->bitstream_restriction_flag= 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user