Use AV_WB32 instead of reimplementing it.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 16 Jan 2009 15:34:37 +0000 (15:34 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 16 Jan 2009 15:34:37 +0000 (15:34 +0000)
Originally committed as revision 16635 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/aviobuf.c

index 34a55d5..defd207 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/crc.h"
+#include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "avio.h"
 #include <stdarg.h>
@@ -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;