[pitivi] Make Stream.isCompatible check that stream classes are compatible as well.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] Make Stream.isCompatible check that stream classes are compatible as well.
- Date: Wed, 5 Aug 2009 14:59:32 +0000 (UTC)
commit d5b525f2b402aefac26acb21ce28ba78ccaaae22
Author: Alessandro Decina <alessandro d gmail com>
Date: Tue Aug 4 17:31:42 2009 +0200
Make Stream.isCompatible check that stream classes are compatible as well.
pitivi/stream.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/stream.py b/pitivi/stream.py
index 15473c3..5f70f5f 100644
--- a/pitivi/stream.py
+++ b/pitivi/stream.py
@@ -75,7 +75,9 @@ class MultimediaStream(Loggable):
@return: C{True} if the stream is compatible.
@rtype: C{bool}
"""
- return not self.caps.intersect(other.caps).is_empty()
+ classes = [type(self), type(other)]
+ compatible_classes = issubclass(*classes) or issubclass(*classes[::-1])
+ return compatible_classes and not self.caps.intersect(other.caps).is_empty()
def isCompatibleWithName(self, other):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]