diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/yuv4mpeg.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/yuv4mpeg.c')
| -rw-r--r-- | ffmpeg/libavformat/yuv4mpeg.c | 6 |
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; } |
