Commit 5451f733 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

smooth: remove/propagate constant value

b_error can only become true after the download thread is joined, after
which point it is never evaluated. So we can treat it as always false.
parent f06e4545
......@@ -687,7 +687,6 @@ void* sms_Thread( void *p_this )
}
cancel:
p_sys->b_error = true;
msg_Dbg(s, "Canceling download thread!");
vlc_restorecancel( canc );
return NULL;
......
......@@ -662,7 +662,7 @@ static chunk_t *get_chunk( stream_t *s, const bool wait, bool *pb_isinit )
* that's why vlc_object_alive() has been deprecated. But if I
* understood well, there is no good solution with a stream_filter
* module anyaway. */
if( !wait || p_sys->b_error )
if( !wait )
{
msg_Warn( s, "get_chunk failed! (starttime %"PRId64")", p_chunk->start_time );
vlc_mutex_unlock( &p_sys->p_current_stream->chunks_lock );
......@@ -771,13 +771,9 @@ static unsigned int sms_Read( stream_t *s, uint8_t *p_read, unsigned int i_read
static int Read( stream_t *s, void *buffer, unsigned i_read )
{
stream_sys_t *p_sys = s->p_sys;
int length = 0;
i_read = __MIN(INT_MAX, i_read);
if( p_sys->b_error )
return 0;
length = sms_Read( s, (uint8_t*) buffer, i_read );
if( length == 0 )
return 0;
......
......@@ -136,7 +136,6 @@ struct stream_sys_t
/* state */
bool b_live; /* live stream? or vod? */
bool b_error; /* parsing error */
bool b_close; /* set by Close() */
};
......
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