Commit 7e8b50a2 authored by Salah-Eddin Shaban's avatar Salah-Eddin Shaban Committed by Jean-Baptiste Kempf

DirectShow: Check for IMediaControl::Run failure

Close #9161
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent d2e34877
......@@ -673,7 +673,12 @@ static int DemuxOpen( vlc_object_t *p_this )
/* Everything is ready. Let's rock baby */
msg_Dbg( p_this, "Playing...");
p_sys->p_control->Run();
if( FAILED( p_sys->p_control->Run() ) )
{
msg_Err( p_this, "Failed to run graph. Capture device may be in use." );
CommonClose( p_this, p_sys );
return VLC_EGENERIC;
}
p_demux->pf_demux = Demux;
p_demux->pf_control = DemuxControl;
......@@ -779,7 +784,12 @@ static int AccessOpen( vlc_object_t *p_this )
/* Everything is ready. Let's rock baby */
msg_Dbg( p_this, "Playing...");
p_sys->p_control->Run();
if( FAILED( p_sys->p_control->Run() ) )
{
msg_Err( p_this, "Failed to run graph. Capture device may be in use." );
CommonClose( p_this, p_sys );
return VLC_EGENERIC;
}
return VLC_SUCCESS;
}
......
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