mirror of https://code.videolan.org/videolan/vlc
* ./configure : better detection of IPv6, fixed solaris handling
* ./src/input/* : fixed a memory leak
This commit is contained in:
parent
30b91066e5
commit
44ed9d3c02
14
configure.in
14
configure.in
|
@ -102,6 +102,9 @@ case "x${target_os}" in
|
|||
x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
|
||||
xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
|
||||
;;
|
||||
xsolaris*)
|
||||
SYS=solaris
|
||||
;;
|
||||
xbeos)
|
||||
SYS=beos
|
||||
save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
|
||||
|
@ -871,11 +874,18 @@ dnl ipv6 plugin - not for QNX yet
|
|||
dnl
|
||||
if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
|
||||
then
|
||||
AC_CHECK_FUNC(inet_pton,[PLUGINS="${PLUGINS} ipv6"],[
|
||||
have_ipv6=0
|
||||
AC_CHECK_FUNC(inet_pton,[have_ipv6=1],[
|
||||
AC_CHECK_LIB(resolv,inet_pton,
|
||||
[PLUGINS="${PLUGINS} ipv6"
|
||||
[have_ipv6=1
|
||||
ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"])
|
||||
])
|
||||
AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
|
||||
AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
|
||||
[AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=0])
|
||||
if test x$have_ipv6 = x1; then
|
||||
PLUGINS="${PLUGINS} ipv6"
|
||||
fi
|
||||
fi
|
||||
if test "x${SYS}" = "xmingw32"
|
||||
then
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* decoders.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2001 VideoLAN
|
||||
* $Id: input.c,v 1.206 2002/07/21 18:57:02 sigmunau Exp $
|
||||
* $Id: input.c,v 1.207 2002/07/24 23:11:55 massiot Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
|
@ -56,7 +56,6 @@
|
|||
static int RunThread ( input_thread_t *p_input );
|
||||
static int InitThread ( input_thread_t *p_input );
|
||||
static void ErrorThread ( input_thread_t *p_input );
|
||||
static void CloseThread ( input_thread_t *p_input );
|
||||
static void EndThread ( input_thread_t *p_input );
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -572,30 +571,22 @@ static void EndThread( input_thread_t * p_input )
|
|||
|
||||
input_DumpStream( p_input );
|
||||
|
||||
/* Tell we're dead */
|
||||
p_input->b_dead = 1;
|
||||
|
||||
/* Free all ES and destroy all decoder threads */
|
||||
input_EndStream( p_input );
|
||||
|
||||
/* Free demultiplexer's data */
|
||||
p_input->pf_end( p_input );
|
||||
module_Unneed( p_input->p_demux_module );
|
||||
|
||||
/* Close the access plug-in */
|
||||
CloseThread( p_input );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* CloseThread: close the target
|
||||
*****************************************************************************/
|
||||
static void CloseThread( input_thread_t * p_input )
|
||||
{
|
||||
/* Close the access plug-in */
|
||||
p_input->pf_close( p_input );
|
||||
module_Unneed( p_input->p_access_module );
|
||||
|
||||
input_AccessEnd( p_input );
|
||||
|
||||
free( p_input->psz_source );
|
||||
|
||||
/* Tell we're dead */
|
||||
p_input->b_dead = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* input_ext-plugins.c: useful functions for access and demux plug-ins
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2001, 2002 VideoLAN
|
||||
* $Id: input_ext-plugins.c,v 1.16 2002/07/21 23:40:24 sam Exp $
|
||||
* $Id: input_ext-plugins.c,v 1.17 2002/07/24 23:11:55 massiot Exp $
|
||||
*
|
||||
* Authors: Christophe Massiot <massiot@via.ecp.fr>
|
||||
*
|
||||
|
@ -548,7 +548,6 @@ ssize_t input_FillBuffer( input_thread_t * p_input )
|
|||
p_input->i_bufsize );
|
||||
if( i_ret < 0 ) i_ret = 0;
|
||||
|
||||
/* We take back the lock before fiddling with buffers */
|
||||
p_input->p_data_buffer = p_buf;
|
||||
p_input->p_current_data = (byte_t *)p_buf + sizeof(data_buffer_t);
|
||||
p_input->p_last_data = p_input->p_current_data + i_remains + i_ret;
|
||||
|
@ -603,6 +602,11 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
|
|||
}
|
||||
}
|
||||
|
||||
if ( !i_size )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
*pp_data = input_ShareBuffer( p_input->p_method_data,
|
||||
p_input->p_data_buffer );
|
||||
|
||||
|
|
Loading…
Reference in New Issue