[FFmpeg-devel] [PATCH] FFplay : Copy all AVFrame fields from the refernce picture to the requested buffer.
Jai Menon
jmenon86
Sat Jul 3 19:31:47 CEST 2010
Currently, the code assumes 3 planes and crashes whenever pixfmts requiring more planes are used.
---
ffplay.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index a43dbb1..d254296 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1591,7 +1591,7 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
ref->w = codec->width;
ref->h = codec->height;
- for(i = 0; i < 3; i ++) {
+ for(i = 0; i < 4; 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;
--
1.7.1.1
More information about the ffmpeg-devel
mailing list