From f80e4a71814511af70478dd7fa012ea5c871e84e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 5 Oct 2009 19:49:06 +0100 Subject: [PATCH] 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. --- ext/schroedinger/gstschroenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index 70312eedc4..e69ac62292 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); -- 2.34.1