diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-08-11 11:06:41 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-08-11 19:30:51 +0200 |
commit | 49cf36f4e3e9183611859af1a07dc6a82ab47288 (patch) | |
tree | 1104882138e8684c1c2b36063414c780e56d3fe5 | |
parent | 61e0e809998f34d573111ee0d28c370793f422d1 (diff) | |
download | ffmpeg-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>
-rw-r--r-- | libavcodec/sanm.c | 6 |
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; |