[DVDnav-discuss] r881 - trunk/libdvdnav/src/dvdread/dvd_input.c

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Apr 19 13:09:30 CEST 2007


Hello,
On Thu, Apr 19, 2007 at 12:34:52AM +0200, nicodvb wrote:
> -#ifndef WIN32
> -  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
> +#ifdef __APPLE__
> +  #define CSS_LIB "libdvdcss.2.dylib"
> +  dvdcss_library = dlopen(CSS_LIB, RTLD_LAZY);
> +#elif defined(WIN32)
> +  #define CSS_LIB "libdvdcss.dll"
> +  dvdcss_library = dlopen(CSS_LIB, RTLD_LAZY);
>  #else
> -  dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
> +  #define CSS_LIB "libdvdcss.so.2"
> +  dvdcss_library = dlopen(CSS_LIB, RTLD_LAZY);
>  #endif

Am I completely blind or is that dlopen duplicated exactly the same way
in all cases instead of putting it just once outside?

>    if(dvdcss_library != NULL) {
> @@ -323,8 +328,8 @@ int dvdinput_setup(void)
>        dvdcss_library = NULL;
>      } else if(!DVDcss_open  || !DVDcss_close || !DVDcss_title || !DVDcss_seek
>  	      || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
> -      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so.2, "
> -	      "this shouldn't happen !\n");
> +      fprintf(stderr,  "libdvdread: Missing symbols in %s, "
> +	      "this shouldn't happen !\n", CSS_LIB);

I was actually thinking of
> fprintf(stderr,  "libdvdread: Missing symbols in "CSS_LIB", this shouldn't happen !\n")

Though this way might make it simpler to "search" for the lib later
on...

Greetings,
Reimar Doeffinger



More information about the DVDnav-discuss mailing list