summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-10-05 19:49:06 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-10-05 21:13:40 +0100
commitf80e4a71814511af70478dd7fa012ea5c871e84e (patch)
tree5977bf40b2fb4b3582dc0979e5a2ddecac3cadf1
parentb4fd433c5774663289ab921741101bbaa188ed8b (diff)
schroenc: When the source pad isn't linked, use the pad template
For negotiation, use the source pad pad template when it doesn't have a peer.
-rw-r--r--ext/schroedinger/gstschroenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c
index 70312eedc..e69ac6229 100644
--- a/ext/schroedinger/gstschroenc.c
+++ b/ext/schroedinger/gstschroenc.c
@@ -263,6 +263,11 @@ gst_schro_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
caps =
gst_pad_get_allowed_caps (GST_BASE_VIDEO_CODEC_SRC_PAD
(base_video_encoder));
+ if (caps == NULL) {
+ caps =
+ gst_caps_copy (gst_pad_get_pad_template_caps
+ (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder)));
+ }
if (gst_caps_is_empty (caps)) {
gst_caps_unref (caps);