[vlc-commits] decoder: pause aout at creation in corner case (fix #6369)
Rémi Denis-Courmont
git at videolan.org
Sun Mar 11 22:05:07 CET 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 11 22:58:10 2012 +0200| [e694bdf41e07e7587ea5a32ce7b495f3581c5d46] | committer: Rémi Denis-Courmont
decoder: pause aout at creation in corner case (fix #6369)
If pausing the decoder races with setting up the audio output pipeline,
the decoder can end up already paused when the audio output is created.
The audio output insists on a strict start -> (pause -> resume ->)*
(pause ->)? stop series of state transition. So it must be paused
explicitly in this corner case.
I have not investigated whether this problem affects the video output
but this seems very likely too.
(cherry picked from commit 092e8242e786dfef3568dabd654e3d886c7534f3)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=e694bdf41e07e7587ea5a32ce7b495f3581c5d46
---
src/input/decoder.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 2e81f78..10298b0 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2296,6 +2296,8 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
p_owner->p_aout = p_aout;
DecoderUpdateFormatLocked( p_dec );
+ if( unlikely(p_owner->b_paused) ) /* fake pause if needed */
+ aout_DecChangePause( p_aout, true, mdate() );
vlc_mutex_unlock( &p_owner->lock );
More information about the vlc-commits
mailing list