]> git.sesse.net Git - vlc/commitdiff
* ./src/misc/modules_plugin.h: fixed a missing function initialization
authorSam Hocevar <sam@videolan.org>
Thu, 24 Jan 2002 13:32:53 +0000 (13:32 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 24 Jan 2002 13:32:53 +0000 (13:32 +0000)
    which made decoder plugins segfault in GetChunk calls.
  * ./configure.in: proper soundcard.h check from Yves Duret.

AUTHORS
configure
configure.in
include/defs.h.in
src/misc/modules.c
src/misc/modules_plugin.h

diff --git a/AUTHORS b/AUTHORS
index f78dab6803b3dd3e8a2694f03f8104bab988a695..2400045e4159814b766f768cccabb9d54869d323 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -148,6 +148,10 @@ E: aholtzma@ess.engr.uvic.ca
 D: AC3 decoder
 D: MPEG video decoder
 
+N: Hans-Peter Jansen
+E: hpj@urpla.net
+D: patch for module options handling
+
 N: Eugenio Jarosiewicz
 E: ej0@cise.ufl.edu
 C: ej
index cadb4370bdad7397044ee2413bb1e5385e4c9b2f..9aec3b957713139c496cffa07983b32a09900d3c 100755 (executable)
--- a/configure
+++ b/configure
@@ -6563,10 +6563,48 @@ fi
 if test x$enable_dsp != xno &&
   (test $SYS != mingw32 || test x$enable_dsp = xyes)
 then
-  if test -c /dev/dsp
-  then
+  for ac_hdr in sys/soundcard.h machine/soundcard.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6571: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6576 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
     PLUGINS="${PLUGINS} dsp"
-  fi
+  
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
 fi
 
 # Check whether --enable-esd or --disable-esd was given.
@@ -6577,7 +6615,7 @@ if test "${enable_esd+set}" = set; then
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6581: checking for $ac_word" >&5
+echo "configure:6619: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6628,7 +6666,7 @@ if test "${enable_arts+set}" = set; then
      # Extract the first word of "artsc-config", so it can be a program name with args.
 set dummy artsc-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6632: checking for $ac_word" >&5
+echo "configure:6670: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6686,17 +6724,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6690: checking for $ac_hdr" >&5
+echo "configure:6728: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6695 "configure"
+#line 6733 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6741,17 +6779,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6745: checking for $ac_hdr" >&5
+echo "configure:6783: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6750 "configure"
+#line 6788 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6839,7 +6877,7 @@ fi
   # Extract the first word of "sdl12-config", so it can be a program name with args.
 set dummy sdl12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6843: checking for $ac_word" >&5
+echo "configure:6881: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6879,7 +6917,7 @@ fi
     # Extract the first word of "sdl11-config", so it can be a program name with args.
 set dummy sdl11-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6883: checking for $ac_word" >&5
+echo "configure:6921: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6920,7 +6958,7 @@ fi
     # Extract the first word of "sdl-config", so it can be a program name with args.
 set dummy sdl-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6924: checking for $ac_word" >&5
+echo "configure:6962: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6966,17 +7004,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6970: checking for $ac_hdr" >&5
+echo "configure:7008: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6975 "configure"
+#line 7013 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7046,17 +7084,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7050: checking for $ac_hdr" >&5
+echo "configure:7088: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7055 "configure"
+#line 7093 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7085,7 +7123,7 @@ done
 
     else
       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:7089: checking for directX headers in ${withval}" >&5
+echo "configure:7127: checking for directX headers in ${withval}" >&5
       if test -f ${withval}/include/directx.h
       then
         PLUGINS="${PLUGINS} directx"
@@ -7182,7 +7220,7 @@ if test "${enable_gnome+set}" = set; then
     # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7186: checking for $ac_word" >&5
+echo "configure:7224: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7227,17 +7265,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7231: checking for $ac_hdr" >&5
+echo "configure:7269: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7236 "configure"
+#line 7274 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7297,7 +7335,7 @@ fi
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7301: checking for $ac_word" >&5
+echo "configure:7339: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7347,17 +7385,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7351: checking for $ac_hdr" >&5
+echo "configure:7389: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7356 "configure"
+#line 7394 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7414,17 +7452,17 @@ if test x$enable_x11 != xno &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7418: checking for $ac_hdr" >&5
+echo "configure:7456: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7423 "configure"
+#line 7461 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7449,12 +7487,29 @@ EOF
     LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
     CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
   
-  CPPFLAGS=$saved_CPPFLAGS
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
+  cat > conftest.$ac_ext <<EOF
+#line 7497 "configure"
+#include "confdefs.h"
+#include <X11/extensions/dmps.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "DPMSInfo" >/dev/null 2>&1; then
+  rm -rf conftest*
+  
+    cat >> confdefs.h <<\EOF
+#define DPMSINFO_IN_DPMS_H 1
+EOF
+
+  
+fi
+rm -f conftest*
+
+  CPPFLAGS=$saved_CPPFLAGS
 fi
 
 # Check whether --enable-xvideo or --disable-xvideo was given.
@@ -7477,17 +7532,17 @@ if test x$enable_xvideo != xno &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7481: checking for $ac_hdr" >&5
+echo "configure:7536: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7486 "configure"
+#line 7541 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7511,7 +7566,7 @@ EOF
     saved_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
-echo "configure:7515: checking for XvSetPortAttribute in -lXv_pic" >&5
+echo "configure:7570: checking for XvSetPortAttribute in -lXv_pic" >&5
 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7519,7 +7574,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7523 "configure"
+#line 7578 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7530,7 +7585,7 @@ int main() {
 XvSetPortAttribute()
 ; return 0; }
 EOF
-if { (eval echo configure:7534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7574,17 +7629,17 @@ if test "${enable_alsa+set}" = set; then
    then
      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-echo "configure:7578: checking for alsa/asoundlib.h" >&5
+echo "configure:7633: checking for alsa/asoundlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7583 "configure"
+#line 7638 "configure"
 #include "confdefs.h"
 #include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7601,7 +7656,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:7605: checking for main in -lasound" >&5
+echo "configure:7660: checking for main in -lasound" >&5
 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7609,14 +7664,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7613 "configure"
+#line 7668 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
index c32be2d967ecb3c0cc3dd3c12b30dedf828a8438..a2c94cc83cd03c85f21a6678ca59d1f2c871ff8c 100644 (file)
@@ -943,10 +943,9 @@ AC_ARG_ENABLE(dsp,
 if test x$enable_dsp != xno &&
   (test $SYS != mingw32 || test x$enable_dsp = xyes)
 then
-  if test -c /dev/dsp
-  then
+  AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h, [
     PLUGINS="${PLUGINS} dsp"
-  fi
+  ])
 fi
 
 dnl
@@ -1299,8 +1298,12 @@ if test x$enable_x11 != xno &&
     PLUGINS="${PLUGINS} x11"
     LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
     CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
-  ]
-  CPPFLAGS=$saved_CPPFLAGS)
+  ])
+  AC_EGREP_HEADER(DPMSInfo,X11/extensions/dmps.h,[
+    AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
+              Define if <X11/extensions/dmps.h> defines DPMSInfo.)
+  ])
+  CPPFLAGS=$saved_CPPFLAGS
 fi
 
 dnl
index 9919f381e107532ef5340e632d4f768874eb5704..0244a9e0a084f34cd8bafeebbda1f419249322cd 100644 (file)
 /* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
 #undef SDL_INCLUDE_FILE
 
+/* Define if <X11/extensions/dmps.h> defines DPMSInfo. */
+#undef DPMSINFO_IN_DPMS_H
+
index 782e18940eb72f10e75a67b4ace9b71a46d7f926..508dafa214832a3b68551f0239f1ec2b6c3d865d 100644 (file)
@@ -2,10 +2,11 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.49 2002/01/21 00:52:07 sam Exp $
+ * $Id: modules.c,v 1.50 2002/01/24 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
+ *          Hans-Peter Jansen <hpj@urpla.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -274,23 +275,23 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
 
     if( psz_name != NULL && *psz_name )
     {
-#define MAX_PLUGIN_NAME 128
         /* A module name was requested. Use the first matching one. */
-        char      psz_realname[ MAX_PLUGIN_NAME + 1 ];
+        char     *psz_realname = NULL;
         int       i_index;
         boolean_t b_ok = 0;
 
-        for( i_index = 0;
-             i_index < MAX_PLUGIN_NAME
-              && psz_name[ i_index ]
-              && psz_name[ i_index ] != ':';
-             i_index++ )
+        psz_realname = strdup( psz_name );
+        if( psz_realname )
         {
-            psz_realname[ i_index ] = psz_name[ i_index ];
+            char *p;
+            p = strchr( psz_realname, ':' );
+            if( p )
+            {
+                *p = '\0';
+            }
+            psz_name = psz_realname;
         }
-
-        psz_realname[ i_index ] = '\0';
-
+            
         for( p_module = p_module_bank->first;
              p_module != NULL;
              p_module = p_module->next )
@@ -313,8 +314,7 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
                  !b_ok && p_module->pp_shortcuts[i_index];
                  i_index++ )
             {
-                b_ok = !strcmp( psz_realname,
-                                p_module->pp_shortcuts[i_index] );
+                b_ok = !strcmp( psz_name, p_module->pp_shortcuts[i_index] );
             }
 
             if( b_ok )
@@ -331,7 +331,12 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
         else
         {
             intf_ErrMsg( "module error: requested %s module `%s' not found",
-                         GetCapabilityName( i_capability ), psz_realname );
+                         GetCapabilityName( i_capability ), psz_name );
+        }
+
+        if( psz_realname )
+        {
+            free( psz_realname );
         }
     }
     else
index b22153a50805ec416f450a4b441cf893be5959f4..f31dcaa333386e06c02ebb637f20421a0d083c38 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h,v 1.6 2002/01/21 23:57:46 massiot Exp $
+ * $Id: modules_plugin.h,v 1.7 2002/01/24 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -198,6 +198,7 @@ module_error( void )
     (p_symbols)->input_DelArea = input_DelArea; \
     (p_symbols)->InitBitstream = InitBitstream; \
     (p_symbols)->NextDataPacket = NextDataPacket; \
+    (p_symbols)->BitstreamNextDataPacket = BitstreamNextDataPacket; \
     (p_symbols)->DecoderError = DecoderError; \
     (p_symbols)->input_InitStream = input_InitStream; \
     (p_symbols)->input_EndStream = input_EndStream; \