From afecdb681bed81b5df0ed18a300c68be603dfdf9 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 29 Feb 2012 02:49:48 +0200 Subject: aviheader.c: silence a warning libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] --- libmpdemux/aviheader.c | 6 ++++-- 1 file 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 #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); -- cgit v1.2.3