[pitivi] project: Fix setting of restriction caps values
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] project: Fix setting of restriction caps values
- Date: Wed, 24 Sep 2014 17:04:36 +0000 (UTC)
commit 9e39466d93e6693edbb25fcf917a8e29d84712f3
Author: Thibault Saunier <tsaunier gnome org>
Date: Wed Sep 24 16:11:51 2014 +0200
project: Fix setting of restriction caps values
pitivi/project.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 46d70e7..c554927 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -709,9 +709,10 @@ class Project(Loggable, GES.Project):
def set_video_restriction_value(self, name, value):
if self.video_profile.get_restriction()[0][name] != value and value:
restriction = self.video_profile.get_restriction().copy_nth(0)
- restriction[0][name] = value
+ restriction.set_value(name, value)
self.video_profile.set_restriction(restriction)
return True
+
return False
def set_audio_restriction_value(self, name, value):
@@ -1086,13 +1087,13 @@ class Project(Loggable, GES.Project):
self.timeline.append_layer()
def _ensureVideoRestrictions(self):
- if not self.videowidth:
+ if self.videowidth is None:
self.videowidth = 720
- if not self.videoheight:
+ if self.videoheight is None:
self.videoheight = 576
- if not self.videorate:
+ if self.videorate is None:
self.videorate = Gst.Fraction(25, 1)
- if not self.videopar:
+ if self.videopar is None:
self.videopar = Gst.Fraction(1, 1)
def _ensureAudioRestrictions(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]