Commit 9715ca47 authored by Laurent Aimar's avatar Laurent Aimar

Properly handle input state in InputSourceInit.

parent dc06ad9f
......@@ -2070,6 +2070,8 @@ static int InputSourceInit( input_thread_t *p_input,
input_source_t *in, const char *psz_mrl,
const char *psz_forced_demux )
{
const bool b_master = in == &p_input->p->input;
char psz_dup[strlen (psz_mrl) + 1];
const char *psz_access;
const char *psz_demux;
......@@ -2190,6 +2192,7 @@ static int InputSourceInit( input_thread_t *p_input,
{
int64_t i_pts_delay;
if( b_master )
input_ChangeState( p_input, OPENING_S );
/* Now try a real access */
......@@ -2268,6 +2271,7 @@ static int InputSourceInit( input_thread_t *p_input,
var_Set( p_input, "seekable", val );
}
if( b_master )
input_ChangeState( p_input, BUFFERING_S );
/* Create the stream_t */
......@@ -2360,6 +2364,7 @@ static int InputSourceInit( input_thread_t *p_input,
return VLC_SUCCESS;
error:
if( b_master )
input_ChangeState( p_input, ERROR_S );
if( in->p_demux )
......
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