summaryrefslogtreecommitdiff
path: root/libavformat/jpeg.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-02-02 19:51:40 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-02-02 19:51:40 +0000
commitfe2a4ca37913331b8d740cd0a43462df6d16944d (patch)
treec0aabc2b6c75ed101754938618a7e946aa782c4e /libavformat/jpeg.c
parent0250738f13ff26aa84e4da3f55ea1b509a0359e7 (diff)
fixed copy
Originally committed as revision 1535 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/jpeg.c')
-rw-r--r--libavformat/jpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/jpeg.c b/libavformat/jpeg.c
index 38a955b31d..0aec8f34a2 100644
--- a/libavformat/jpeg.c
+++ b/libavformat/jpeg.c
@@ -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;