# HG changeset patch # User arpi # Date 1019258981 0 # Node ID 6c6e55db908fc93c66282ac5be1b0d862d7df26e # Parent d9fc38c5609cb274f4956d35d2094ce55f4439d6 swscaler yv12 vs i420 workaround diff -r d9fc38c5609c -r 6c6e55db908f libmpcodecs/vf_scale.c --- 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");