Mercurial > libavcodec.hg
comparison common.c @ 219:5b88ee1abf97 libavcodec
(m)jpeg pad/flush with 1 instead of 0, fix by Rik Snel <rsnel@cube.dyndns.org>
author | arpi_esp |
---|---|
date | Sat, 26 Jan 2002 00:22:25 +0000 |
parents | b691dd3e9088 |
children | 5fc0c3af3fe4 |
comparison
equal
deleted
inserted
replaced
218:9df2d13e64b2 | 219:5b88ee1abf97 |
---|---|
155 | 155 |
156 /* pad the end of the output stream with zeros */ | 156 /* pad the end of the output stream with zeros */ |
157 void jflush_put_bits(PutBitContext *s) | 157 void jflush_put_bits(PutBitContext *s) |
158 { | 158 { |
159 unsigned int b; | 159 unsigned int b; |
160 s->bit_buf |= ~1U >> s->bit_cnt; /* set all the unused bits to one */ | |
160 | 161 |
161 while (s->bit_cnt > 0) { | 162 while (s->bit_cnt > 0) { |
162 b = s->bit_buf >> 24; | 163 b = s->bit_buf >> 24; |
163 *s->buf_ptr++ = b; | 164 *s->buf_ptr++ = b; |
164 if (b == 0xff) | 165 if (b == 0xff) |