diff gif.c @ 5089:bff60ecc02f9 libavcodec

Use AV_xx throughout libavcodec
author ramiro
date Sat, 02 Jun 2007 01:41:07 +0000
parents f6f67a8bdd09
children 448466ff832a
line wrap: on
line diff
--- a/gif.c	Fri Jun 01 21:17:05 2007 +0000
+++ b/gif.c	Sat Jun 02 01:41:07 2007 +0000
@@ -132,13 +132,9 @@
     } else {
         bit_buf |= value << (bit_cnt);
 
-        *s->buf_ptr = bit_buf & 0xff;
-        s->buf_ptr[1] = (bit_buf >> 8) & 0xff;
-        s->buf_ptr[2] = (bit_buf >> 16) & 0xff;
-        s->buf_ptr[3] = (bit_buf >> 24) & 0xff;
+        bytestream_put_le32(&s->buf_ptr, bit_buf);
 
         //printf("bitbuf = %08x\n", bit_buf);
-        s->buf_ptr+=4;
         if (s->buf_ptr >= s->buf_end)
             puts("bit buffer overflow !!"); // should never happen ! who got rid of the callback ???
 //            flush_buffer_rev(s);
@@ -195,9 +191,7 @@
     } else {
         for(i=0;i<256;i++) {
             v = palette[i];
-            bytestream_put_byte(bytestream, (v >> 16) & 0xff);
-            bytestream_put_byte(bytestream, (v >> 8) & 0xff);
-            bytestream_put_byte(bytestream, (v) & 0xff);
+            bytestream_put_be24(bytestream, v);
         }
     }