diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-11-02 23:13:34 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-11-02 23:13:34 +0000 |
commit | 93481fe5fe092d2646a2ae6cccc4ffaaec5b0297 (patch) | |
tree | b84c7fe66c648b5246b19fd25deaa92c307aeecc /libavcodec/bytestream.h | |
parent | 1984f5cdc97a256014770ae2de45ea47476b894d (diff) | |
download | ffmpeg-93481fe5fe092d2646a2ae6cccc4ffaaec5b0297.tar.gz |
change gif muxer to simple gif encoder
Originally committed as revision 6874 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bytestream.h')
-rw-r--r-- | libavcodec/bytestream.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index bd2ce1f6bd..c9d6130f1b 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -47,4 +47,29 @@ static always_inline unsigned int bytestream_get_buffer(uint8_t **b, uint8_t *ds return size; } +static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; + *(*b)++ = value >> 8; + *(*b)++ = value >> 16; + *(*b)++ = value >> 24; +} + +static always_inline void bytestream_put_le16(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; + *(*b)++ = value >> 8; +} + +static always_inline void bytestream_put_byte(uint8_t **b, const unsigned int value) +{ + *(*b)++ = value; +} + +static always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size) +{ + memcpy(*b, src, size); + (*b) += size; +} + #endif /* FFMPEG_BYTESTREAM_H */ |