avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 22 Oct 2014 00:28:54 +0000 (02:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 22 Oct 2014 00:28:54 +0000 (02:28 +0200)
No testcase known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index 17421dd8b06462a2993e5dae92dd38ae24cf62e9..cdb75afbcb23f7ec36c9d4f4cd4004f70a57e367 100644 (file)
@@ -2101,7 +2101,7 @@ the_end:
             if (!(s->upscale_h & (1<<p)))
                 continue;
             if (p==1 || p==2) {
-                w >>= hshift;
+                w = FF_CEIL_RSHIFT(w, hshift);
                 h = FF_CEIL_RSHIFT(h, vshift);
             }
             if (s->upscale_v & (1<<p))