diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-03-04 17:53:50 -0800 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-03-05 11:22:11 -0800 |
commit | 3574a85ce57366ba7429edef93d5cad8640fb68c (patch) | |
tree | 963585651b226922412af44096e328ea36273d36 /libavcodec/h264.c | |
parent | b70feb405386cda5ea7a7d2a9921a7f2f17976a4 (diff) | |
download | ffmpeg-3574a85ce57366ba7429edef93d5cad8640fb68c.tar.gz |
Replace computations of remaining bits with calls to get_bits_left().
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 36a4e2bb03..31a69f9a14 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3667,7 +3667,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){ if(s->mb_y >= s->mb_height){ tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); - if(get_bits_count(&s->gb) == s->gb.size_in_bits ) { + if (get_bits_left(&s->gb) == 0) { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); return 0; @@ -3679,9 +3679,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){ } } - if(get_bits_count(&s->gb) >= s->gb.size_in_bits && s->mb_skip_run<=0){ + if (get_bits_left(&s->gb) <= 0 && s->mb_skip_run <= 0){ tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits); - if(get_bits_count(&s->gb) == s->gb.size_in_bits ){ + if (get_bits_left(&s->gb) == 0) { ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END&part_mask); if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x); |