changeset 5712:6c6e55db908f

swscaler yv12 vs i420 workaround
author arpi
date Fri, 19 Apr 2002 23:29:41 +0000
parents d9fc38c5609c
children 634fbb5dd181
files libmpcodecs/vf_scale.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_scale.c	Fri Apr 19 23:24:13 2002 +0000
+++ b/libmpcodecs/vf_scale.c	Fri Apr 19 23:29:41 2002 +0000
@@ -93,8 +93,10 @@
     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");