diff options
Diffstat (limited to 'gst/law/alaw-encode.c')
-rw-r--r-- | gst/law/alaw-encode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index 991085da..9cbcae98 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -139,6 +139,9 @@ alawenc_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"); @@ -159,9 +162,9 @@ alawenc_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; } |