summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2006-05-17 12:36:26 +0000
committerEdward Hervey <bilboed@bilboed.com>2006-05-17 12:36:26 +0000
commitb0c86b554c2886325c2fc4a4c939a4a5f116d5e3 (patch)
tree3a780141cce4a423369c646f5386908cf803ed79
parentd35441766ffa29e6298079d61630b652d2d64971 (diff)
gst/law/mulaw-decode.c: We can only do caps intersection if the othercaps are non-empty and not
Original commit message from CVS: * gst/law/mulaw-decode.c: (mulawdec_getcaps): We can only do caps intersection if the othercaps are non-empty and not ANY. Else we return the pad template (base_caps).
-rw-r--r--ChangeLog6
-rw-r--r--gst/law/mulaw-decode.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f3f7935b..722344e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-17 Edward Hervey <edward@fluendo.com>
+
+ * gst/law/mulaw-decode.c: (mulawdec_getcaps):
+ We can only do caps intersection if the othercaps are non-empty and not
+ ANY. Else we return the pad template (base_caps).
+
2006-05-17 Tim-Philipp Müller <tim at centricular dot net>
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c
index fe8e07d0..983c814b 100644
--- a/gst/law/mulaw-decode.c
+++ b/gst/law/mulaw-decode.c
@@ -72,6 +72,11 @@ mulawdec_getcaps (GstPad * pad)
GValue irate = { 0 }, ichans = {
0};
+ if (gst_caps_is_empty (othercaps) || gst_caps_is_any (othercaps)) {
+ gst_caps_unref (othercaps);
+ goto done;
+ }
+
structure = gst_caps_get_structure (othercaps, 0);
orate = gst_structure_get_value (structure, "rate");
ochans = gst_structure_get_value (structure, "channels");