[vlc-commits] videotoolbox: fix deadlock when input is paused
Thomas Guillem
git at videolan.org
Tue Nov 7 15:24:52 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 7 15:22:07 2017 +0100| [757eb4766c628ea81913db68c95cba51002f850b] | committer: Thomas Guillem
videotoolbox: fix deadlock when input is paused
cf. comment.
Fixes #19013
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=757eb4766c628ea81913db68c95cba51002f850b
---
modules/codec/videotoolbox.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index def5b0d2f4..19bc9c4e85 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1680,7 +1680,12 @@ static void DecoderCallback(void *decompressionOutputRefCon,
if(likely(p_info))
{
+ /* Unlock the mutex because decoder_NewPicture() is blocking. Indeed,
+ * it can wait indefinitely when the input is paused. */
+ vlc_mutex_unlock(&p_sys->lock);
picture_t *p_pic = decoder_NewPicture(p_dec);
+ vlc_mutex_lock(&p_sys->lock);
+
if (!p_pic)
goto end;
More information about the vlc-commits
mailing list