[FFmpeg-cvslog] Use AV_RN32 for an unaligned read in the mxg demuxer.

Carl Eugen Hoyos git at videolan.org
Wed Jun 26 10:26:00 CEST 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Jun 26 09:33:44 2013 +0200| [35aed74fdc7b53ac6c2f0648aa864a108d0e0c7e] | committer: Carl Eugen Hoyos

Use AV_RN32 for an unaligned read in the mxg demuxer.

Fixes ticket #2707.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35aed74fdc7b53ac6c2f0648aa864a108d0e0c7e
---

 libavformat/mxg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 604be78..3a6cf77 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -74,7 +74,7 @@ static int mxg_read_header(AVFormatContext *s)
 static uint8_t* mxg_find_startmarker(uint8_t *p, uint8_t *end)
 {
     for (; p < end - 3; p += 4) {
-        uint32_t x = *(uint32_t*)p;
+        uint32_t x = AV_RN32(p);
 
         if (x & (~(x+0x01010101)) & 0x80808080) {
             if (p[0] == 0xff) {



More information about the ffmpeg-cvslog mailing list