summaryrefslogtreecommitdiffstats
path: root/libavcodec/h2645_parse.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-03-10 21:32:51 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-25 23:09:47 +0200
commit7562567f41aa61860ed5ab03dbb11c1316a34021 (patch)
treecfdd85b5e23adda2bdcaeb1814bfcbbd60ad48e2 /libavcodec/h2645_parse.c
parent0bd0401336df4e4ca7f3da6a7e226904fd7d5add (diff)
downloadffmpeg-streaming-7562567f41aa61860ed5ab03dbb11c1316a34021.zip
ffmpeg-streaming-7562567f41aa61860ed5ab03dbb11c1316a34021.tar.gz
avcodec/h2645_parse: Replace RNXYA by RNXY in ff_h2645_extract_rbsp()
Fixes misaligned accesses Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h2645_parse.c')
-rw-r--r--libavcodec/h2645_parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index e6c4038..dbf2435 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -53,8 +53,8 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length,
i++
#if HAVE_FAST_64BIT
for (i = 0; i + 1 < length; i += 9) {
- if (!((~AV_RN64A(src + i) &
- (AV_RN64A(src + i) - 0x0100010001000101ULL)) &
+ if (!((~AV_RN64(src + i) &
+ (AV_RN64(src + i) - 0x0100010001000101ULL)) &
0x8000800080008080ULL))
continue;
FIND_FIRST_ZERO;
@@ -63,8 +63,8 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length,
}
#else
for (i = 0; i + 1 < length; i += 5) {
- if (!((~AV_RN32A(src + i) &
- (AV_RN32A(src + i) - 0x01000101U)) &
+ if (!((~AV_RN32(src + i) &
+ (AV_RN32(src + i) - 0x01000101U)) &
0x80008080U))
continue;
FIND_FIRST_ZERO;
OpenPOWER on IntegriCloud