# HG changeset patch # User reimar # Date 1232120077 0 # Node ID 4b550415c87496f29555308fb2662916e089396e # Parent 5defcf4194fb918cbaa5a8012095be2b00e2a974 Use AV_WB32 instead of reimplementing it. diff -r 5defcf4194fb -r 4b550415c874 aviobuf.c --- a/aviobuf.c Fri Jan 16 15:32:33 2009 +0000 +++ b/aviobuf.c Fri Jan 16 15:34:37 2009 +0000 @@ -20,6 +20,7 @@ */ #include "libavutil/crc.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio.h" #include @@ -756,10 +757,7 @@ 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;