Commit 4c681149 authored by Sam Hocevar's avatar Sam Hocevar

  * ./src/misc/modules_plugin.h: fixed a missing function initialization
    which made decoder plugins segfault in GetChunk calls.
  * ./configure.in: proper soundcard.h check from Yves Duret.
parent 7d6f6984
......@@ -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
......
This diff is collapsed.
......@@ -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
......
......@@ -404,3 +404,6 @@
/* 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
......@@ -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
......
......@@ -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; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment