[FFmpeg-cvslog] r24032 - trunk/ffplay.c
jai_menon
subversion
Sat Jul 3 23:20:32 CEST 2010
Author: jai_menon
Date: Sat Jul 3 23:20:32 2010
New Revision: 24032
Log:
FFplay : Copy all AVFrame fields from the reference picture to the
requested buffer.
Modified:
trunk/ffplay.c
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Sat Jul 3 22:57:32 2010 (r24031)
+++ trunk/ffplay.c Sat Jul 3 23:20:32 2010 (r24032)
@@ -1591,9 +1591,9 @@ static int input_get_buffer(AVCodecConte
ref->w = codec->width;
ref->h = codec->height;
- for(i = 0; i < 3; i ++) {
- unsigned hshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w;
- unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
+ for(i = 0; i < 4; i ++) {
+ unsigned hshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w : 0;
+ unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h : 0;
if (ref->data[i]) {
ref->data[i] += (edge >> hshift) + ((edge * ref->linesize[i]) >> vshift);
More information about the ffmpeg-cvslog
mailing list