swscaler yv12 vs i420 workaround

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5713 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-04-19 23:29:41 +00:00
parent aca71ad5aa
commit af898e75d3
1 changed files with 4 additions and 2 deletions

View File

@ -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");