[vlmc-devel] ClipWorkflow: Fix dead lock.

Hugo Beauzée-Luyssen git at videolan.org
Sun Sep 2 13:37:35 CEST 2012


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Sep  2 10:01:48 2012 +0300| [d6be76a0ee6a9403917dd4660bf2be692592fcbf] | committer: Hugo Beauzée-Luyssen

ClipWorkflow: Fix dead lock.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=d6be76a0ee6a9403917dd4660bf2be692592fcbf
---

 src/Workflow/ClipWorkflow.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp
index 0306293..09d8792 100644
--- a/src/Workflow/ClipWorkflow.cpp
+++ b/src/Workflow/ClipWorkflow.cpp
@@ -71,7 +71,10 @@ ClipWorkflow::initialize()
     m_previousPts = -1;
     m_pauseDuration = -1;
 
-    connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( loadingComplete() ), Qt::DirectConnection );
+    //Use QueuedConnection to avoid getting called from intf-event callback, as
+    //we will trigger intf-event callback as well when setting time for this clip,
+    //thus resulting in a deadlock.
+    connect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( loadingComplete() ), Qt::QueuedConnection );
     connect( m_mediaPlayer, SIGNAL( endReached() ), this, SLOT( clipEndReached() ), Qt::DirectConnection );
     connect( m_mediaPlayer, SIGNAL( errorEncountered() ), this, SLOT( errorEncountered() ) );
     m_mediaPlayer->play();



More information about the Vlmc-devel mailing list