[MPlayer-cvslog] r30897 - in trunk: DOCS/man/en/mplayer.1 cfg-common-opts.h get_path.h mencoder.c mplayer.c

Diego Biurrun diego at biurrun.de
Tue Mar 16 00:43:23 CET 2010


On Mon, Mar 15, 2010 at 09:30:06AM +0100, komh wrote:
> 
> Log:
> Add -codecpath option.
> It allows to search binary codecs in non-standard directories.

I notice I should have reviewed this with more care earlier...

> --- trunk/get_path.h	Mon Mar 15 07:39:21 2010	(r30896)
> +++ trunk/get_path.h	Mon Mar 15 09:30:06 2010	(r30897)
> @@ -24,4 +24,10 @@
>  
> +#ifdef CONFIG_WIN32DLL
> +extern void SetCodecPath(const char *);   // in loader/drv.c

pointless extern keyword

Declaring this function here is wrong.  get_path.h is for functions
from get_path.c.  Also, SetCodecPath is already declared in loader/drv.h
so you should be able to use that header instead.

> +static char *codec_path=NULL;

Again, this is not the right place to declare this as it's not related
to get_path.c.  A sideeffect are something like half a dozen of the
following warnings:

get_path.h:30: warning: 'codec_path' defined but not used

> --- trunk/mencoder.c	Mon Mar 15 07:39:21 2010	(r30896)
> +++ trunk/mencoder.c	Mon Mar 15 09:30:06 2010	(r30897)
> @@ -534,6 +534,11 @@ if (frameno_filename) {
>  
> +#ifdef CONFIG_WIN32DLL
> +  if (codec_path)
> +    SetCodecPath(codec_path);
> +#endif

mencoder.c:537: warning: passing argument 1 of 'SetCodecPath' from incompatible pointer type

> --- trunk/mplayer.c	Mon Mar 15 07:39:21 2010	(r30896)
> +++ trunk/mplayer.c	Mon Mar 15 09:30:06 2010	(r30897)
> @@ -2701,6 +2701,11 @@ int gui_no_filename=0;
>  
> +#ifdef CONFIG_WIN32DLL
> +  if (codec_path)
> +    SetCodecPath(codec_path);
> +#endif

mplayer.c:2707: warning: passing argument 1 of 'SetCodecPath' from incompatible pointer type

Diego


More information about the MPlayer-cvslog mailing list