changeset 8483:c8113e1e91c0 libavcodec

Move sync line pointers code to the end of the loop, it is simpler that way.
author michael
date Fri, 26 Dec 2008 17:04:31 +0000
parents ff23c1a249b2
children 6fdb5b053d4b
files faxcompr.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/faxcompr.c	Fri Dec 26 16:59:10 2008 +0000
+++ b/faxcompr.c	Fri Dec 26 17:04:31 2008 +0000
@@ -170,11 +170,6 @@
             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 @@
             saved_run = 0;
             mode = !mode;
         }
+        //sync line pointers
+        while(run_off <= offs){
+            run_off += *ref++;
+            run_off += *ref++;
+        }
     }
     *runs++ = saved_run;
     *runs++ = 0;