diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index 3f18af28f8..1b0683339e 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -21,6 +21,9 @@ #include #include +#include +#include + #include "config.h" #include "mp_msg.h" @@ -29,7 +32,6 @@ #include "stheader.h" #include "aviprint.h" #include "aviheader.h" -#include "libavutil/common.h" static MainAVIHeader avih; @@ -232,7 +234,7 @@ while(1){ s->bIndexSubType = stream_read_char(demuxer->stream); s->bIndexType = stream_read_char(demuxer->stream); s->nEntriesInUse = stream_read_dword_le(demuxer->stream); - *(uint32_t *)s->dwChunkId = stream_read_dword_le(demuxer->stream); + AV_WN32(s->dwChunkId, stream_read_dword_le(demuxer->stream)); stream_read(demuxer->stream, (char *)s->dwReserved, 3*4); memset(s->dwReserved, 0, 3*4);