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;