[vlmc-devel] commit: Fix a deadlock when resizing (Ludovic Fauvet )

git at videolan.org git at videolan.org
Thu Mar 18 01:19:31 CET 2010


vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Thu Mar 18 01:14:54 2010 +0100| [79f53cd787a30f20e28f6c13361491e129eab735] | committer: Ludovic Fauvet 

Fix a deadlock when resizing

Using QueuedConnection to avoid a deadlock is nasty but it works.

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

 src/Gui/timeline/GraphicsAudioItem.cpp |    4 +++-
 src/Gui/timeline/GraphicsMovieItem.cpp |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Gui/timeline/GraphicsAudioItem.cpp b/src/Gui/timeline/GraphicsAudioItem.cpp
index 2d26cd8..7ff2cf0 100644
--- a/src/Gui/timeline/GraphicsAudioItem.cpp
+++ b/src/Gui/timeline/GraphicsAudioItem.cpp
@@ -45,7 +45,9 @@ GraphicsAudioItem::GraphicsAudioItem( Clip* clip ) : m_clip( clip )
     // Adjust the width
     setWidth( clip->length() );
     // Automatically adjust future changes
-    connect( clip, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) );
+    connect( clip, SIGNAL( lengthUpdated() ),
+             this, SLOT( adjustLength() ),
+             Qt::QueuedConnection );
 }
 
 GraphicsAudioItem::~GraphicsAudioItem()
diff --git a/src/Gui/timeline/GraphicsMovieItem.cpp b/src/Gui/timeline/GraphicsMovieItem.cpp
index cdcde29..791a422 100644
--- a/src/Gui/timeline/GraphicsMovieItem.cpp
+++ b/src/Gui/timeline/GraphicsMovieItem.cpp
@@ -47,7 +47,9 @@ GraphicsMovieItem::GraphicsMovieItem( Clip* clip ) : m_clip( clip )
     // Adjust the width
     setWidth( clip->length() );
     // Automatically adjust for future changes
-    connect( clip, SIGNAL( lengthUpdated() ), this, SLOT( adjustLength() ) );
+    connect( clip, SIGNAL( lengthUpdated() ),
+             this, SLOT( adjustLength() ),
+             Qt::QueuedConnection );
 }
 
 GraphicsMovieItem::~GraphicsMovieItem()



More information about the Vlmc-devel mailing list