diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-07-19 14:41:08 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-07-19 14:41:08 +0000 |
commit | a254c5745b27eec28430402f49937d9505691f20 (patch) | |
tree | 5545b107bf5b9850189baf2c55451d2e45620d49 /libavformat/aviobuf.c | |
parent | dd9f59160e4809fba631b555d4e6022e0b4340ec (diff) | |
download | ffmpeg-streaming-a254c5745b27eec28430402f49937d9505691f20.zip ffmpeg-streaming-a254c5745b27eec28430402f49937d9505691f20.tar.gz |
kill duplicated get/put_be24()
Originally committed as revision 4460 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 55fa57c..17a5bdf 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -253,6 +253,12 @@ void put_be16(ByteIOContext *s, unsigned int val) put_byte(s, val); } +void put_be24(ByteIOContext *s, unsigned int val) +{ + put_be16(s, val >> 8); + put_byte(s, val); +} + void put_tag(ByteIOContext *s, const char *tag) { while (*tag) { @@ -407,10 +413,8 @@ unsigned int get_le16(ByteIOContext *s) unsigned int get_le32(ByteIOContext *s) { unsigned int val; - val = get_byte(s); - val |= get_byte(s) << 8; - val |= get_byte(s) << 16; - val |= get_byte(s) << 24; + val = get_le16(s); + val |= get_le16(s) << 16; return val; } @@ -430,15 +434,20 @@ unsigned int get_be16(ByteIOContext *s) return val; } -unsigned int get_be32(ByteIOContext *s) +unsigned int get_be24(ByteIOContext *s) { unsigned int val; - val = get_byte(s) << 24; - val |= get_byte(s) << 16; - val |= get_byte(s) << 8; + val = get_be16(s) << 8; val |= get_byte(s); return val; } +unsigned int get_be32(ByteIOContext *s) +{ + unsigned int val; + val = get_be16(s) << 16; + val |= get_be16(s); + return val; +} double get_be64_double(ByteIOContext *s) { |