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.
This commit is contained in:
Jan Schmidt 2009-10-05 19:49:06 +01:00
parent b4fd433c57
commit f80e4a7181

View file

@ -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);