[pitivi] viewer: Do not call the expose function when we set the aspect ratio
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] viewer: Do not call the expose function when we set the aspect ratio
- Date: Sat, 25 Oct 2014 07:45:05 +0000 (UTC)
commit 8f252a4ad6a47103f0d8f96daab745f16641fef0
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Oct 24 23:33:35 2014 +0200
viewer: Do not call the expose function when we set the aspect ratio
During caps renegotiation resulting from the change of the video
height/width, aspect ratio changes, there is a race in glimagesink where
we end up with the viewer displaying broken frames calling the expose()
method of the sink at the same time.
Avoid calling the videosink.expose() while we change the resolution
in the pipeline.
https://bugzilla.gnome.org/show_bug.cgi?id=739145
pitivi/viewer.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 1b4953e..871e489 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -836,15 +836,25 @@ class ViewerWidget(Gtk.AspectFrame, Loggable):
self.pixbuf = None
self.pipeline = None
self.transformation_properties = None
+ self._setting_ratio = False
+
# FIXME PyGi Styling with Gtk3
# for state in range(Gtk.StateType.INSENSITIVE + 1):
# self.modify_bg(state, self.style.black)
def _drawCb(self, unused, unused1, unused2):
- if self.sink:
+ if self._setting_ratio:
+ # During caps renogotiation resulting from
+ # the change of the rendering setting/aspect ratio
+ # changes, we could end up with the viewer displaying
+ # broken frames, avoid calling the videosink.expose()
+ # in that case (https://bugzilla.gnome.org/show_bug.cgi?id=739145)
+ self._setting_ratio = False
+ elif self.sink:
self.sink.expose()
def setDisplayAspectRatio(self, ratio):
+ self._setting_ratio = True
self.set_property("ratio", float(ratio))
def init_transformation_events(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]