Index: libmpcodecs/vd.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v retrieving revision 1.81 diff -u -b -p -r1.81 vd.c --- libmpcodecs/vd.c 18 Dec 2004 14:06:35 -0000 1.81 +++ libmpcodecs/vd.c 27 Feb 2005 06:52:55 -0000 @@ -146,7 +146,7 @@ int mpcodecs_config_vo(sh_video_t *sh, i int screen_size_x=0;//SCREEN_SIZE_X; int screen_size_y=0;//SCREEN_SIZE_Y; // vo_functions_t* video_out=sh->video_out; - vf_instance_t* vf=sh->vfilter,*sc=NULL; + vf_instance_t* vf=sh->vfilter,*sc=NULL, *lc=NULL; int palette=0; if(!sh->disp_w || !sh->disp_h) @@ -228,11 +228,21 @@ csp_again: for(vo = vf ; vo->next ; vo = vo->next) vp = vo; if(vo->query_format(vo,IMGFMT_MPEGPES) && (!vp || (vp && strcmp(vp->info->name,"lavc")))) { - ve = vf_open_filter(vo,"lavc",NULL); + ve = lc = vf_open_filter(vo,"lavc",NULL); if(vp) vp->next = ve; else vf = ve; goto csp_again; } + if (lc) { + // Remove the lavc filter we've added + if (vf == lc) + vf = vf->next; + else { + for (vo = vf; vo->next != lc; vo = vo->next); + vo->next = lc->next; + } + vf_uninit_filter(lc); + } } mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_VOincompCodec); sh->vf_inited=-1;