[vlc-devel] commit: Fast decoder thread cancellation. (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:47:26 2008 +0100| [baae4f741755facb3b160a405abd24f081bc2edf] | committer: Laurent Aimar
Fast decoder thread cancellation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=baae4f741755facb3b160a405abd24f081bc2edf
---
src/input/decoder.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 789a724..eeadefa 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -862,6 +862,7 @@ static void *DecoderThread( vlc_object_t *p_this )
for( ;; )
{
block_t *p_block = block_FifoGet( p_owner->p_fifo );
+
/* Make sure there is no cancellation point other than this one^^.
* If you need one, be sure to push cleanup of p_block. */
DecoderSignalBuffering( p_dec, p_block == NULL );
@@ -877,9 +878,9 @@ static void *DecoderThread( vlc_object_t *p_this )
vlc_restorecancel( canc );
}
+ /* Ensure fast cancellation in case the fifo is not empty */
+ vlc_testcancel();
}
-
- DecoderSignalBuffering( p_dec, true );
return NULL;
}
More information about the vlc-devel
mailing list