Commit f02a9be4 authored by Sam Hocevar's avatar Sam Hocevar

Backported two fixes from HEAD:

  * ./plugins/mpeg_system/mpeg_es.c: fixed a deadlock at the end of some
    streams.
  * ./src/input/input_ext-plugins.c: fixed a memory leak.
parent 769b2247
......@@ -2,7 +2,7 @@
* mpeg_es.c : Elementary Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpeg_es.c,v 1.8 2002/04/19 13:56:11 sam Exp $
* $Id: mpeg_es.c,v 1.8.2.1 2002/07/25 19:46:59 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -177,6 +177,11 @@ static int ESDemux( input_thread_t * p_input )
pes_packet_t * p_pes;
data_packet_t * p_data;
if( p_fifo == NULL )
{
return -1;
}
i_read = input_SplitBuffer( p_input, &p_data, ES_PACKET_SIZE );
if ( i_read <= 0 )
......@@ -200,6 +205,9 @@ static int ESDemux( input_thread_t * p_input )
vlc_mutex_lock( &p_fifo->data_lock );
if( p_fifo->i_depth >= MAX_PACKETS_IN_FIFO )
{
/* If the decoder is sleeping, wake him up. */
vlc_cond_signal( &p_fifo->data_wait );
/* Wait for the decoder. */
vlc_cond_wait( &p_fifo->data_wait, &p_fifo->data_lock );
}
......
......@@ -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.10.2.2 2002/07/21 23:41:44 sam Exp $
* $Id: input_ext-plugins.c,v 1.10.2.3 2002/07/25 19:46:59 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -606,6 +606,11 @@ ssize_t input_SplitBuffer( input_thread_t * p_input,
{
i_size = i_ret;
}
if( !i_size )
{
return( 0 );
}
}
*pp_data = input_ShareBuffer( p_input->p_method_data,
......
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