aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/faxcompr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-26 17:04:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-26 17:04:31 +0000
commit6f5c00eb9f8d3cbb100cbd4022f061914e10dfa1 (patch)
treea393e6d1967700a6cde4513d004c94f7216e0e02 /libavcodec/faxcompr.c
parente3a54b66948a4a37c8ad2c5504148802976b5c7b (diff)
downloadffmpeg-6f5c00eb9f8d3cbb100cbd4022f061914e10dfa1.tar.gz
Move sync line pointers code to the end of the loop, it is simpler that way.
Originally committed as revision 16341 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/faxcompr.c')
-rw-r--r--libavcodec/faxcompr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index 2801da28fb..b727284642 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -170,11 +170,6 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
av_log(avctx, AV_LOG_ERROR, "Incorrect mode VLC\n");
return -1;
}
- //sync line pointers
- if(runs != run_start)while(run_off <= offs){
- run_off += *ref++;
- run_off += *ref++;
- }
if(!cmode){//pass mode
run_off += *ref++;
run = run_off - offs;
@@ -234,6 +229,11 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
saved_run = 0;
mode = !mode;
}
+ //sync line pointers
+ while(run_off <= offs){
+ run_off += *ref++;
+ run_off += *ref++;
+ }
}
*runs++ = saved_run;
*runs++ = 0;