Commit 032657a6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mms: remove redundant vlc_object_alive() calls

If the input thread is killed, the net_* functions will return an
error. It gets propagated all the way up to where vlc_object_alive()
was checked.
parent 7eb623f3
......@@ -118,11 +118,7 @@ static int Open( vlc_object_t *p_this )
}
if( MMSTUOpen ( p_access ) )
{
if( !vlc_object_alive(p_access) )
return VLC_EGENERIC;
/* try mmsh if mmstu failed */
{ /* try mmsh if mmstu failed */
return MMSHOpen ( p_access );
}
return VLC_SUCCESS;
......
......@@ -331,7 +331,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
Stop( p_access );
Start( p_access, i_packet * p_sys->asfh.i_min_data_packet_size );
while( vlc_object_alive (p_access) )
for( ;; )
{
if( GetPacket( p_access, &ck ) )
break;
......
......@@ -136,12 +136,10 @@ int MMSTUOpen( access_t *p_access )
/* connect */
if( i_proto == MMS_PROTO_AUTO )
{ /* first try with TCP and then UDP*/
if( ( i_status = MMSOpen( p_access, &p_sys->url, MMS_PROTO_TCP ) ) )
{
if( vlc_object_alive(p_access) )
i_status = MMSOpen( p_access, &p_sys->url, MMS_PROTO_TCP );
if( i_status )
i_status = MMSOpen( p_access, &p_sys->url, MMS_PROTO_UDP );
}
}
else
{
i_status = MMSOpen( p_access, &p_sys->url, i_proto );
......@@ -341,7 +339,7 @@ static int Seek( access_t * p_access, uint64_t i_pos )
var_buffer_free( &buffer );
while( vlc_object_alive (p_access) )
for( ;; )
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
......@@ -356,7 +354,7 @@ static int Seek( access_t * p_access, uint64_t i_pos )
}
}
while( vlc_object_alive (p_access) )
for( ;; )
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
......@@ -1508,9 +1506,6 @@ static int mms_HeaderMediaRead( access_t *p_access, int i_type )
{
int i_status;
if( !vlc_object_alive (p_access) )
return -1;
i_status = mms_ReceivePacket( p_access );
if( i_status < 0 )
{
......
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