diff options
author | Jai Menon <jmenon86@gmail.com> | 2010-07-03 21:20:32 +0000 |
---|---|---|
committer | Jai Menon <jmenon86@gmail.com> | 2010-07-03 21:20:32 +0000 |
commit | cfb7e6e6d5d2ba2c7b4664e77c47fb866b08fa1b (patch) | |
tree | ca4799b9282aebc19225a641452d3b6fcf08898b /ffplay.c | |
parent | 13088d27e44bdd9315cf50f3f314b067c60861f9 (diff) | |
download | ffmpeg-cfb7e6e6d5d2ba2c7b4664e77c47fb866b08fa1b.tar.gz |
FFplay : Copy all AVFrame fields from the reference picture to the
requested buffer.
Originally committed as revision 24032 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1591,9 +1591,9 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic) 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); |