aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/gif.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-06-02 01:41:07 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-06-02 01:41:07 +0000
commit2c124cb65c24cc7d0538260726045d68442eef25 (patch)
tree3752a8d02aa478d977264e8ce0438f49c92a4aca /libavcodec/gif.c
parent29b29011e5631c4e867baf42258a00886d142841 (diff)
downloadffmpeg-2c124cb65c24cc7d0538260726045d68442eef25.tar.gz
Use AV_xx throughout libavcodec
Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/gif.c')
-rw-r--r--libavcodec/gif.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index f67ab52c22..c22a41823f 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -132,13 +132,9 @@ static void gif_put_bits_rev(PutBitContext *s, int n, unsigned int value)
} 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 @@ static int gif_image_write_header(uint8_t **bytestream,
} 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);
}
}