comparison faxcompr.c @ 8477:5f85d21a70b2 libavcodec

cosmetic (moving pix_left update)
author michael
date Fri, 26 Dec 2008 16:30:50 +0000
parents 0a0d7c4f2cf3
children 2f7c09bb6bfb
comparison
equal deleted inserted replaced
8476:0a0d7c4f2cf3 8477:5f85d21a70b2
129 unsigned int t; 129 unsigned int t;
130 for(;;){ 130 for(;;){
131 t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2); 131 t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2);
132 run += t; 132 run += t;
133 if(t < 64){ 133 if(t < 64){
134 pix_left -= run;
135 *runs++ = run; 134 *runs++ = run;
136 if(runs >= runend){ 135 if(runs >= runend){
137 av_log(avctx, AV_LOG_ERROR, "Run overrun\n"); 136 av_log(avctx, AV_LOG_ERROR, "Run overrun\n");
138 return -1; 137 return -1;
139 } 138 }
139 pix_left -= run;
140 if(pix_left <= 0){ 140 if(pix_left <= 0){
141 if(!pix_left) 141 if(!pix_left)
142 break; 142 break;
143 runs[-1] += pix_left; 143 runs[-1] += pix_left;
144 av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n"); 144 av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");