summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r--libavcodec/huffyuv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 3c64029bad..4fa6ddf7f8 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -693,7 +693,7 @@ static void decode_422_bitstream(HYuvContext *s, int count){
count/=2;
- if(count >= (s->gb.size_in_bits - get_bits_count(&s->gb))/(31*4)){
+ 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++){
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);
@@ -711,7 +711,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
count/=2;
- if(count >= (s->gb.size_in_bits - get_bits_count(&s->gb))/(31*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++){
READ_2PIX(s->temp[0][2*i ], s->temp[0][2*i+1], 0);
}