summaryrefslogtreecommitdiff
path: root/libavcodec/pnmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-02 12:32:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-02 12:32:32 +0200
commit4fb3e1a652a9395aa37456dfaa145590e8d11065 (patch)
treef8c46788ca2a301d6c50049c0cfc4042bafb4e9d /libavcodec/pnmdec.c
parent62d07bb321a98fc3e3bdd17d804b98450cd5bcbb (diff)
avcodec/pnmdec: fix unaligned read
Fixes fate-lavf-pam on alpha Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pnmdec.c')
-rw-r--r--libavcodec/pnmdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index f88fc2623b..1e00723e0d 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -31,7 +31,7 @@ static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
} else {
int i;
for (i=0; i<n/2; i++) {
- ((uint16_t *)dst)[i] = av_be2ne16(((uint16_t *)src)[i]);
+ ((uint16_t *)dst)[i] = AV_RB16(src+2*i);
}
}
}