From af898e75d3b79d16670eb323b7baf67a4dca3906 Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 19 Apr 2002 23:29:41 +0000 Subject: [PATCH] swscaler yv12 vs i420 workaround git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5713 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_scale.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index ca951d9544..f474f4cd3f 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -93,8 +93,10 @@ static int config(struct vf_instance_s* vf, if(vf->priv->ctx) freeSwsContext(vf->priv->ctx); // new swscaler: - vf->priv->ctx=getSwsContextFromCmdLine(width,height,outfmt, - vf->priv->w,vf->priv->h,best); + vf->priv->ctx=getSwsContextFromCmdLine(width,height, + (outfmt==IMGFMT_I420 || outfmt==IMGFMT_IYUV)?IMGFMT_YV12:outfmt, + vf->priv->w,vf->priv->h, + (best==IMGFMT_I420 || best==IMGFMT_IYUV)?IMGFMT_YV12:best); if(!vf->priv->ctx){ // error... printf("Couldn't init SwScaler for this setup\n");