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/huffyuv.c | |
parent | b70feb405386cda5ea7a7d2a9921a7f2f17976a4 (diff) | |
download | ffmpeg-3574a85ce57366ba7429edef93d5cad8640fb68c.tar.gz |
Replace computations of remaining bits with calls to get_bits_left().
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index bedaaf2f91..82b26a912f 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -718,7 +718,7 @@ static void decode_422_bitstream(HYuvContext *s, int count){ count/=2; if(count >= (get_bits_left(&s->gb))/(31*4)){ - for(i=0; i<count && get_bits_count(&s->gb) < s->gb.size_in_bits; i++){ + for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { READ_2PIX(s->temp[0][2*i ], s->temp[1][i], 1); READ_2PIX(s->temp[0][2*i+1], s->temp[2][i], 2); } @@ -736,7 +736,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){ count/=2; if(count >= (get_bits_left(&s->gb))/(31*2)){ - for(i=0; i<count && get_bits_count(&s->gb) < s->gb.size_in_bits; i++){ + for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) { READ_2PIX(s->temp[0][2*i ], s->temp[0][2*i+1], 0); } }else{ |