From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavformat/yuv4mpeg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ffmpeg/libavformat/yuv4mpeg.c') diff --git a/ffmpeg/libavformat/yuv4mpeg.c b/ffmpeg/libavformat/yuv4mpeg.c index f34a4af..1999c73 100644 --- a/ffmpeg/libavformat/yuv4mpeg.c +++ b/ffmpeg/libavformat/yuv4mpeg.c @@ -22,7 +22,6 @@ #include "libavutil/pixdesc.h" #include "avformat.h" #include "internal.h" -#include "libavutil/pixdesc.h" #define Y4M_MAGIC "YUV4MPEG2" #define Y4M_FRAME_MAGIC "FRAME" @@ -217,8 +216,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]; @@ -232,7 +231,6 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) } } - avio_flush(pb); return 0; } -- cgit v1.2.3