vlc | branch: master | Steve Lhomme <[email protected]> | Thu May 3 17:00:34 2018 +0200| [7b98a5d8468955d0a4526a259ed1580453bfda07] | committer: Rémi Denis-Courmont
background_worker: use a define for the inactive worker deadline Modified-and-... Signed-off-by: Rémi Denis-Courmont <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b98a5d8468955d0a4526a259ed1580453bfda07 --- src/misc/background_worker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/misc/background_worker.c b/src/misc/background_worker.c index 58668a5bff..af50caed46 100644 --- a/src/misc/background_worker.c +++ b/src/misc/background_worker.c @@ -74,7 +74,7 @@ static void* Thread( void* data ) vlc_array_remove( &worker->tail.data, 0 ); } - if( worker->head.deadline == VLC_TS_0 && item == NULL ) + if( worker->head.deadline == VLC_TS_INVALID && item == NULL ) worker->head.active = false; worker->head.id = item ? item->id : NULL; vlc_cond_broadcast( &worker->head.wait ); @@ -86,7 +86,7 @@ static void* Thread( void* data ) else worker->head.deadline = INT64_MAX; } - else if( worker->head.deadline != VLC_TS_0 ) + else if( worker->head.deadline != VLC_TS_INVALID ) { /* Wait 1 seconds for new inputs before terminating */ mtime_t deadline = mdate() + INT64_C(1000000); @@ -96,7 +96,7 @@ static void* Thread( void* data ) { /* Timeout: if there is still no items, the thread will be * terminated at next loop iteration (active = false). */ - worker->head.deadline = VLC_TS_0; + worker->head.deadline = VLC_TS_INVALID; } continue; } @@ -173,7 +173,7 @@ static void BackgroundWorkerCancel( struct background_worker* worker, void* id) while( ( id == NULL && worker->head.active ) || ( id != NULL && worker->head.id == id ) ) { - worker->head.deadline = VLC_TS_0; + worker->head.deadline = VLC_TS_INVALID; vlc_cond_signal( &worker->head.worker_wait ); vlc_cond_signal( &worker->tail.wait ); vlc_cond_wait( &worker->head.wait, &worker->lock ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
