[vlc-devel] commit: Ensure fast fetcher/preparser thread cancelation. (Laurent Aimar )
git version control
git at videolan.org
Mon Jan 5 21:26:43 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Dec 22 19:26:47 2008 +0100| [c12edba9d8189b0714197b6e50a38e3d8b6d9351] | committer: Laurent Aimar
Ensure fast fetcher/preparser thread cancelation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c12edba9d8189b0714197b6e50a38e3d8b6d9351
---
src/playlist/fetcher.c | 3 +++
src/playlist/preparser.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c
index 690385f..88a289c 100644
--- a/src/playlist/fetcher.c
+++ b/src/playlist/fetcher.c
@@ -366,6 +366,9 @@ static void *Thread( void *p_data )
{
input_item_t *p_item;
+ /* Be sure to be cancellable before our queue is empty */
+ vlc_testcancel();
+
/* */
vlc_mutex_lock( &p_fetcher->lock );
mutex_cleanup_push( &p_fetcher->lock );
diff --git a/src/playlist/preparser.c b/src/playlist/preparser.c
index cca3022..c8c52ca 100644
--- a/src/playlist/preparser.c
+++ b/src/playlist/preparser.c
@@ -187,6 +187,9 @@ static void *Thread( void *data )
{
input_item_t *p_current;
+ /* Be sure to be cancellable before our queue is empty */
+ vlc_testcancel();
+
/* */
vlc_mutex_lock( &p_preparser->lock );
mutex_cleanup_push( &p_preparser->lock );
More information about the vlc-devel
mailing list