summaryrefslogtreecommitdiff
path: root/libavcodec/faxcompr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-26 13:51:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-26 13:51:52 +0000
commit68d48cc5924d86e1dc82433ad6e8855c3b51fad5 (patch)
treeec4d783666b9380c921b178d508ab34efce06e6d /libavcodec/faxcompr.c
parentbc0f7a9c75dc03f679849abe9254f133c9e4719f (diff)
Simplify zero run handling in put_line().
Originally committed as revision 16328 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/faxcompr.c')
-rw-r--r--libavcodec/faxcompr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index f53c64b47b..b5f6598bbe 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -238,12 +238,10 @@ static void put_line(uint8_t *dst, int size, int width, const int *runs)
while(pix_left > 0){
run = runs[run_idx++];
mode = ~mode;
- if(!run){
- continue;
- }
pix_left -= run;
for(; run > 16; run -= 16)
put_sbits(&pb, 16, mode);
+ if(run)
put_sbits(&pb, run, mode);
}
}