From 6c1b114eed9ec1bf3ffea9a63294e927e29cc2b8 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 2 Jan 2004 07:09:23 +0000 Subject: Convert elements to use gst_pad_use_explicit_caps() where appropriate. Original commit message from CVS: Convert elements to use gst_pad_use_explicit_caps() where appropriate. --- gst/matroska/matroska-demux.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gst/matroska') diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 0d222fe7..d3764457 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -868,12 +868,6 @@ gst_matroska_demux_add_stream (GstMatroskaDemux *demux) /* the pad in here */ context->pad = gst_pad_new_from_template (templ, padname); - if (caps != NULL) { - if (gst_pad_try_set_caps (context->pad, caps) <= 0) { - GST_WARNING ("Failed to set caps on next element for %s", - padname); - } - } g_free (padname); /* set some functions */ @@ -887,9 +881,12 @@ gst_matroska_demux_add_stream (GstMatroskaDemux *demux) gst_matroska_demux_get_src_query_types); gst_pad_set_query_function (context->pad, gst_matroska_demux_handle_src_query); + gst_pad_use_explicit_caps (context->pad); gst_element_add_pad (GST_ELEMENT (demux), context->pad); + gst_pad_set_explicit_caps (context->pad, caps); + /* tadaah! */ return TRUE; } -- cgit