summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2012-03-04 17:53:50 -0800
committerAlex Converse <alex.converse@gmail.com>2012-03-05 11:22:11 -0800
commit3574a85ce57366ba7429edef93d5cad8640fb68c (patch)
tree963585651b226922412af44096e328ea36273d36 /libavcodec/h264_ps.c
parentb70feb405386cda5ea7a7d2a9921a7f2f17976a4 (diff)
Replace computations of remaining bits with calls to get_bits_left().
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 76bf116a3f..287702c7c4 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -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;
}