gst_pad_set_link_function (ffmpegdec->sinkpad, gst_ffmpegdec_connect);
gst_pad_set_chain_function (ffmpegdec->sinkpad, gst_ffmpegdec_chain);
ffmpegdec->srcpad = gst_pad_new_from_template (oclass->srctempl, "src");
+ gst_pad_use_explicit_caps (ffmpegdec->srcpad);
gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->sinkpad);
gst_element_add_pad (GST_ELEMENT (ffmpegdec), ffmpegdec->srcpad);
caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type,
ffmpegdec->context);
if (caps == NULL ||
- gst_pad_try_set_caps (ffmpegdec->srcpad, caps) <= 0) {
+ !gst_pad_set_explicit_caps (ffmpegdec->srcpad, caps)) {
gst_element_error (GST_ELEMENT (ffmpegdec),
"Failed to link ffmpeg decoder (%s) to next element",
oclass->in_plugin->name);
pad = gst_pad_new_from_template (templ, padname);
g_free (padname);
+ gst_pad_use_explicit_caps (pad);
/* FIXME: convert() and query() functions for pad */
/* store pad internally */
/* get caps that belongs to this stream */
caps = gst_ffmpeg_codecid_to_caps (st->codec.codec_id,
&st->codec);
- if (gst_pad_try_set_caps (pad, caps) <= 0) {
- GST_DEBUG (
- "Failed to set caps from ffdemuxer on next element");
- /* we continue here, in the next pad-is-usable check,
- * we'll return nonetheless */
- }
+ gst_pad_set_explicit_caps (pad, caps);
+ /* we continue here, in the next pad-is-usable check,
+ * we'll return nonetheless */
}
/* shortcut to pad belonging to this stream */