[MPlayer-dev-eng] [PATCH] don't use unsupported audio plugins, use all plugins (bugfix)

Felix Buenemann atmosfear at users.sourceforge.net
Wed Jun 5 23:09:34 CEST 2002


On Wednesday 05 June 2002 03:47, Felix Buenemann wrote:
> On Sunday 26 May 2002 02:09, Christian Ohm wrote:
> > hi.
> >
> > accordign to arpi's suggestion i made a patch that just disables those
> > plugins that can't handle the audio format. it also fixes a bug (and i'm
> > pretty sure this _is_ a bug) where, when playing multiple files, after
> > the first file only the first audio plugin is used.
>
> can you give a simple test-case commandline so I can check your changes
> before applying to cvs?

And I just noted a problem in your patch:
   if(ao_plugin_cfg.plugin_list){
-    if(!add_plugin(i,ao_plugin_cfg.plugin_list))
+    config = malloc(strlen(ao_plugin_cfg.plugin_list));
+    if (!strcpy(config, ao_plugin_cfg.plugin_list))
       return 0;
+    if(!add_plugin(i,config))
+      return 0;
+    free(config);
   }

see, in case of an early return 0, config doesn't get freed, so you should 
make sure it is freed before returning.

>
> > bye
> > christian ohm

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list