changeset 8475:b7e5b6350969 libavcodec

minor simplification
author michael
date Fri, 26 Dec 2008 15:21:48 +0000
parents cb4009996efa
children 0a0d7c4f2cf3
files faxcompr.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/faxcompr.c	Fri Dec 26 15:05:12 2008 +0000
+++ b/faxcompr.c	Fri Dec 26 15:21:48 2008 +0000
@@ -196,11 +196,11 @@
                 }
                 *runs++ = run + saved_run;
                 saved_run = 0;
-                if(pix_left < run){
+                pix_left -= run;
+                if(pix_left < 0){
                     av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");
                     return -1;
                 }
-                pix_left -= run;
                 offs += run;
                 mode = !mode;
             }