]> git.sesse.net Git - vlc/commitdiff
* ./configure.ac.in: we explicitely link the dvdplay plugin with libdvdcss
authorSam Hocevar <sam@videolan.org>
Mon, 28 Oct 2002 16:26:44 +0000 (16:26 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 28 Oct 2002 16:26:44 +0000 (16:26 +0000)
    if it was found.
  * ./modules/access/dvdplay/tools.c: we don't try to stat the device if it
    looks like a Win32 drive.
  * ./src/misc/messages.c: we only flush stderr under Win32.

configure.ac.in
modules/access/dvdplay/tools.c
src/misc/messages.c

index 9f55e922c2478578419efa844ca6f4090e0c8014..e5830c61ab677ef962459c3b756262f72f244705 100644 (file)
@@ -763,7 +763,8 @@ then
     then
       AC_CHECK_HEADERS(dvdcss/dvdcss.h,
         [ PLUGINS="${PLUGINS} dvd"
-          LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss" ],
+          LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
+          LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
         [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
           AC_MSG_ERROR([cannot find libdvdcss headers]) ])
     else
@@ -781,6 +782,7 @@ then
         AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
         BUILTINS="${BUILTINS} dvd"
         LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
+        LDFLAGS_dvdcss="${LDFLAGS_dvdcss} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
         CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
       else
         dnl  The given libdvdcss wasn't built
@@ -803,6 +805,7 @@ then
       AC_MSG_RESULT(yes)
       PLUGINS="${PLUGINS} dvd"
       LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
+      LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
       CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
     else
       dnl  No libdvdcss could be found, sorry
@@ -835,7 +838,7 @@ then
      AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
         [int foo() { return DVD_VIDEO_LB_LEN; }],[
           PLUGINS="${PLUGINS} dvdread"
-          LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread"
+          LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread ${LDFLAGS_dvdcss}"
           CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}"
         ],[
           if test "x${enable_dvdread}" != "x"
@@ -877,7 +880,7 @@ then
   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
   AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
       PLUGINS="${PLUGINS} dvdplay"
-      LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread"
+      LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread ${LDFLAGS_dvdcss}"
       CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}"
     ],[
     if test "x${enable_dvdplay}" != x
index e00d7038b11163d1f3f85e4c0cee5a4967c469a5..336ad71b8d9291cb2eb3a3aa8ddc7aeaf1c8d8fa 100644 (file)
@@ -2,7 +2,7 @@
  * tools.c: tools for dvd plugin.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: tools.c,v 1.2 2002/10/23 21:54:33 gbazin Exp $
+ * $Id: tools.c,v 1.3 2002/10/28 16:26:44 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -100,21 +100,30 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
         if( !psz_source ) return NULL;
     }
 
-    if( stat( psz_source, &stat_info ) == -1 )
+#ifdef WIN32
+    if( psz_source[0] && psz_source[1] == ':' && psz_source[2] == '\0' )
     {
-        msg_Err( p_input, "cannot stat() source `%s' (%s)",
-                     psz_source, strerror(errno));
-        free( psz_source );
-        return NULL;
+        /* Don't try to stat the file */
     }
-    if( !S_ISBLK(stat_info.st_mode) &&
-        !S_ISCHR(stat_info.st_mode) &&
-        !S_ISDIR(stat_info.st_mode) )
+    else
+#endif
     {
-        msg_Dbg( p_input, "plugin discarded"
-                         " (not a valid source)" );
-        free( psz_source );
-        return NULL;
+        if( stat( psz_source, &stat_info ) == -1 )
+        {
+            msg_Warn( p_input, "cannot stat() source `%s' (%s)",
+                               psz_source, strerror(errno) );
+            free( psz_source );
+            return NULL;
+        }
+
+        if( !S_ISBLK(stat_info.st_mode) &&
+            !S_ISCHR(stat_info.st_mode) &&
+            !S_ISDIR(stat_info.st_mode) )
+        {
+            msg_Dbg( p_input, "plugin discarded (not a valid source)" );
+            free( psz_source );
+            return NULL;
+        }
     }
     
     msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d",
index fb33a1425f18f39c0b06d3d823434358d62a4371..f39b8ee934fd79743ed2539655daf9b4447a2e9b 100644 (file)
@@ -4,7 +4,7 @@
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.16 2002/10/22 21:10:28 sam Exp $
+ * $Id: messages.c,v 1.17 2002/10/28 16:26:44 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -481,7 +481,9 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
                          p_item->psz_msg );
     }
 
+#ifdef WIN32
     fflush( stderr );
+#endif
 }
 
 /*****************************************************************************