[MPlayer-dev-eng] [PATCH] libaf fix for lost cmdline when reinit (swtich audio track)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Dec 9 10:37:05 CET 2007


Hello,
On Sun, Dec 09, 2007 at 03:35:31PM +0800, Ulion wrote:
> Index: libaf/af.c
> ===================================================================
> --- libaf/af.c	(revision 25325)
> +++ libaf/af.c	(working copy)
> @@ -102,13 +102,14 @@
>  
>  /*/ Function for creating a new filter of type name. The name may
>    contain the commandline parameters for the filter */
> -static af_instance_t* af_create(af_stream_t* s, char* name)
> +static af_instance_t* af_create(af_stream_t* s, const char* name)
>  {
> +  name = strdup(name);

Doesn't this give warnings? name is still const char * like this.
Better rename the argument (e.g. to orig_name) and do
char *name = strdup(orig_name);

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list