summaryrefslogtreecommitdiff
path: root/examples/play.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/play.py')
-rw-r--r--examples/play.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/play.py b/examples/play.py
index c6b5ac1..a7522b4 100644
--- a/examples/play.py
+++ b/examples/play.py
@@ -32,6 +32,8 @@ class GstPlayer:
if message.structure is None:
return
if message.structure.get_name() == 'prepare-xwindow-id':
+ # Sync with the X server before giving the X-id to the sink
+ gtk.gdk.display_get_default().sync()
self.videowidget.set_sink(message.src)
message.src.set_property('force-aspect-ratio', True)