[FFmpeg-devel] [PATCH] FFplay : Copy all AVFrame fields from the refernce picture to the requested buffer.

Michael Niedermayer michaelni
Sat Jul 3 19:51:10 CEST 2010


On Sat, Jul 03, 2010 at 11:01:47PM +0530, Jai Menon wrote:
> 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;

these dont look like they are correct for 4 planes

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100703/94d6858e/attachment.pgp>



More information about the ffmpeg-devel mailing list