summaryrefslogtreecommitdiffstats
path: root/gst/law/mulaw-encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/law/mulaw-encode.c')
-rw-r--r--gst/law/mulaw-encode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c
index ae92fc40..4b56eb1e 100644
--- a/gst/law/mulaw-encode.c
+++ b/gst/law/mulaw-encode.c
@@ -72,6 +72,9 @@ mulawenc_getcaps (GstPad * pad)
GValue irate = { 0 }, ichans = {
0};
+ if (gst_caps_is_empty (othercaps) || gst_caps_is_any (othercaps))
+ goto done;
+
structure = gst_caps_get_structure (othercaps, 0);
orate = gst_structure_get_value (structure, "rate");
ochans = gst_structure_get_value (structure, "channels");
@@ -92,9 +95,9 @@ mulawenc_getcaps (GstPad * pad)
gst_structure_set_value (structure, "rate", &irate);
gst_structure_set_value (structure, "channels", &ichans);
+ done:
gst_caps_unref (othercaps);
}
-done:
return base_caps;
}