summaryrefslogtreecommitdiff
path: root/ffmpeg/libavformat/yuv4mpeg.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/yuv4mpeg.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/yuv4mpeg.c')
-rw-r--r--ffmpeg/libavformat/yuv4mpeg.c6
1 files changed, 2 insertions, 4 deletions
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;
}