Commit 9697b479 authored by Sam Hocevar's avatar Sam Hocevar

* ./src/input/input_ext-plugins.c: added a missing lock to input_SplitBuffer

    which was causing crashes with some demux plugins (mpeg_audio, avi).
parent c7fe104b
......@@ -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.14 2002/07/20 18:01:43 sam Exp $
* $Id: input_ext-plugins.c,v 1.15 2002/07/21 14:32:35 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -543,14 +543,17 @@ ssize_t input_FillBuffer( input_thread_t * p_input )
vlc_mutex_unlock( &p_input->p_method_data->lock );
i_ret = p_input->pf_read( p_input,
(byte_t *)p_buf + sizeof(data_buffer_t)
+ i_remains,
p_input->i_bufsize );
(byte_t *)p_buf + sizeof(data_buffer_t)
+ i_remains,
p_input->i_bufsize );
if( i_ret < 0 ) i_ret = 0;
/* We take back the lock before fiddling with buffers */
vlc_mutex_lock( &p_input->p_method_data->lock );
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;
vlc_mutex_unlock( &p_input->p_method_data->lock );
return( (ssize_t)i_remains + i_ret );
}
......
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