diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-06-24 19:13:58 -0400 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-06-24 19:13:58 -0400 |
commit | cea8a0077fc597a11838f2f7242c01722d577b44 (patch) | |
tree | 3585fcaad28d48a2ed8dccd6067bc80cba5d176b | |
parent | 1029822a91c2b04a863fe082951ac28f4c60f87c (diff) | |
download | ffmpeg-cea8a0077fc597a11838f2f7242c01722d577b44.tar.gz |
yuv4mpeg: correctly handle chroma for odd luma sizes.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r-- | libavformat/yuv4mpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index bf48230bb3..a6d83469ef 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -217,8 +217,8 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) // Adjust for smaller Cb and Cr planes av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift, &v_chroma_shift); - width >>= h_chroma_shift; - height >>= v_chroma_shift; + width = FF_CEIL_RSHIFT(width, h_chroma_shift); + height = FF_CEIL_RSHIFT(height, v_chroma_shift); ptr1 = picture->data[1]; ptr2 = picture->data[2]; |