Browse Source

Use AV_RN32 for an unaligned read in the mxg demuxer.

Fixes ticket #2707.
tags/n2.0
Carl Eugen Hoyos 12 years ago
parent
commit
35aed74fdc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mxg.c

+ 1
- 1
libavformat/mxg.c View File

@@ -74,7 +74,7 @@ static int mxg_read_header(AVFormatContext *s)
static uint8_t* mxg_find_startmarker(uint8_t *p, uint8_t *end) static uint8_t* mxg_find_startmarker(uint8_t *p, uint8_t *end)
{ {
for (; p < end - 3; p += 4) { for (; p < end - 3; p += 4) {
uint32_t x = *(uint32_t*)p;
uint32_t x = AV_RN32(p);


if (x & (~(x+0x01010101)) & 0x80808080) { if (x & (~(x+0x01010101)) & 0x80808080) {
if (p[0] == 0xff) { if (p[0] == 0xff) {


Loading…
Cancel
Save