summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-02-29 02:49:48 +0200
committerUoti Urpala <uau@mplayer2.org>2012-02-29 02:49:48 +0200
commitafecdb681bed81b5df0ed18a300c68be603dfdf9 (patch)
tree66ae56f35569c703192816e36bc3d3f1da20d196
parentc3ef8607ae75c2ae93e94a5f32453c36fca558c8 (diff)
downloadmpv-afecdb681bed81b5df0ed18a300c68be603dfdf9.tar.bz2
mpv-afecdb681bed81b5df0ed18a300c68be603dfdf9.tar.xz
aviheader.c: silence a warning
libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
-rw-r--r--libmpdemux/aviheader.c6
1 files changed, 4 insertions, 2 deletions
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 <unistd.h>
#include <errno.h>
+#include <libavutil/common.h>
+#include <libavutil/intreadwrite.h>
+
#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);