]> git.sesse.net Git - ffmpeg/commitdiff
fixed copy
authorFabrice Bellard <fabrice@bellard.org>
Sun, 2 Feb 2003 19:51:40 +0000 (19:51 +0000)
committerFabrice Bellard <fabrice@bellard.org>
Sun, 2 Feb 2003 19:51:40 +0000 (19:51 +0000)
Originally committed as revision 1535 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/jpeg.c

index 38a955b31d67c9a077ed24051055ed74d6080cbb..0aec8f34a27a095859e4e7ea2a988c286aa2279b 100644 (file)
@@ -125,11 +125,11 @@ static int jpeg_read(ByteIOContext *f,
             switch(c->pix_fmt) {
             default:
             case PIX_FMT_YUV420P:
-                w >>= 1;
-                h >>= 1;
+                w = (w + 1) >> 1;
+                h = (h + 1) >> 1;
                 break;
             case PIX_FMT_YUV422P:
-                w >>= 1;
+                w = (w + 1) >> 1;
                 break;
             case PIX_FMT_YUV444P:
                 break;