Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-11 13:06:41 +0400
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2013-08-11 21:30:51 +0400
commit49cf36f4e3e9183611859af1a07dc6a82ab47288 (patch)
tree1104882138e8684c1c2b36063414c780e56d3fe5 /libavcodec/sanm.c
parent61e0e809998f34d573111ee0d28c370793f422d1 (diff)
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/sanm.c')
-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;