[vlc-commits] decoder: remove incorrect assertion
Rémi Denis-Courmont
git at videolan.org
Thu Nov 5 20:42:49 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 5 21:41:28 2015 +0200| [d0efd59165021ece141d34e155ae6ea5cc482901] | committer: Rémi Denis-Courmont
decoder: remove incorrect assertion
The decoder can be paused by the decoder owner while the decoder thread
is decoding. We still need to queue the last decoded picture(s) to the
(not yet paused) video output.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d0efd59165021ece141d34e155ae6ea5cc482901
---
src/input/decoder.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index f6dfbcf..5f7cc01 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -906,13 +906,10 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
vlc_mutex_unlock( &p_owner->lock );
/* FIXME: The *input* FIFO should not be locked here. This will not work
- * properly if/when pictures are queued asynchronously (c.f. assert()). */
+ * properly if/when pictures are queued asynchronously. */
vlc_fifo_Lock( p_owner->p_fifo );
- if( p_owner->paused )
- {
- assert( p_owner->frames_countdown > 0 );
- p_owner->frames_countdown--;
- }
+ if( unlikely(p_owner->paused) && likely(p_owner->frames_countdown > 0) )
+ p_owner->frames_countdown--;
vlc_fifo_Unlock( p_owner->p_fifo );
/* */
More information about the vlc-commits
mailing list