aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-11 11:06:41 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-11 19:30:51 +0200
commit49cf36f4e3e9183611859af1a07dc6a82ab47288 (patch)
tree1104882138e8684c1c2b36063414c780e56d3fe5 /libavcodec
parent61e0e809998f34d573111ee0d28c370793f422d1 (diff)
downloadffmpeg-49cf36f4e3e9183611859af1a07dc6a82ab47288.tar.gz
sanm: fix undefined behaviour on big-endian.
A variable with post-increment may only appear once in a statement. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/sanm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index e6e866ef8e..d1ef0ce2a1 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -1044,8 +1044,10 @@ static int decode_5(SANMVideoContext *ctx)
#if HAVE_BIGENDIAN
npixels = ctx->npixels;
frm = ctx->frm0;
- while (npixels--)
- *frm++ = av_bswap16(*frm);
+ while (npixels--) {
+ *frm = av_bswap16(*frm);
+ frm++;
+ }
#endif
return 0;