summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-19 14:41:08 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-19 14:41:08 +0000
commita254c5745b27eec28430402f49937d9505691f20 (patch)
tree5545b107bf5b9850189baf2c55451d2e45620d49 /libavformat/aviobuf.c
parentdd9f59160e4809fba631b555d4e6022e0b4340ec (diff)
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.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 55fa57ca73..17a5bdf521 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)
{