OSDN Git Service

(m)jpeg pad/flush with 1 instead of 0, fix by Rik Snel <rsnel@cube.dyndns.org>
authorArpi <arpi@thot.banki.hu>
Sat, 26 Jan 2002 00:22:25 +0000 (00:22 +0000)
committerArpi <arpi@thot.banki.hu>
Sat, 26 Jan 2002 00:22:25 +0000 (00:22 +0000)
Originally committed as revision 280 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/common.c

index fb73c7e..b3436eb 100644 (file)
@@ -157,6 +157,7 @@ void jput_bits(PutBitContext *s, int n, unsigned int value)
 void jflush_put_bits(PutBitContext *s)
 {
     unsigned int b;
+    s->bit_buf |= ~1U >> s->bit_cnt; /* set all the unused bits to one */
 
     while (s->bit_cnt > 0) {
         b = s->bit_buf >> 24;