From aa805f94c51bdbe302f1123d961085071a17b0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Fri, 16 Jan 2009 15:34:37 +0000 Subject: [PATCH] Use AV_WB32 instead of reimplementing it. Originally committed as revision 16635 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/aviobuf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 34a55d5f58..defd20789b 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -20,6 +20,7 @@ */ #include "libavutil/crc.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio.h" #include @@ -756,10 +757,7 @@ static int dyn_packet_buf_write(void *opaque, uint8_t *buf, int buf_size) int ret; /* packetized write: output the header */ - buf1[0] = (buf_size >> 24); - buf1[1] = (buf_size >> 16); - buf1[2] = (buf_size >> 8); - buf1[3] = (buf_size); + AV_WB32(buf1, buf_size); ret= dyn_buf_write(opaque, buf1, 4); if(ret < 0) return ret;