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 38a955b..0aec8f3 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;