[FFmpeg-cvslog] avcodec/pnmdec: fix unaligned read
Michael Niedermayer
git at videolan.org
Mon Sep 2 12:38:12 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Sep 2 12:32:32 2013 +0200| [4fb3e1a652a9395aa37456dfaa145590e8d11065] | committer: Michael Niedermayer
avcodec/pnmdec: fix unaligned read
Fixes fate-lavf-pam on alpha
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fb3e1a652a9395aa37456dfaa145590e8d11065
---
libavcodec/pnmdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index f88fc26..1e00723 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);
}
}
}
More information about the ffmpeg-cvslog
mailing list