summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-28 16:10:21 -0400
committerDave Robillard <dave@drobilla.net>2009-05-03 12:03:18 -0400
commita73b99f8906be023da813b917464c2ca882d1e26 (patch)
tree360682f7f71a810605235945f86ac0dcf7a0cd7b
parentf69088151bf2f42af1a36d1c173d6bb9af40d515 (diff)
downloadgst-plugins-bad-a73b99f8906be023da813b917464c2ca882d1e26.tar.gz
gst-plugins-bad-a73b99f8906be023da813b917464c2ca882d1e26.tar.bz2
gst-plugins-bad-a73b99f8906be023da813b917464c2ca882d1e26.zip
rtpmux: Reject wrong caps
-rw-r--r--gst/rtpmux/gstrtpmux.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c
index ecef0c7f..82d4b003 100644
--- a/gst/rtpmux/gstrtpmux.c
+++ b/gst/rtpmux/gstrtpmux.c
@@ -364,28 +364,26 @@ gst_rtp_mux_setcaps (GstPad * pad, GstCaps * caps)
{
GstRTPMux *rtp_mux;
GstStructure *structure;
- gboolean ret = TRUE;
+ gboolean ret = FALSE;
GstRTPMuxPadPrivate *padpriv = gst_pad_get_element_private (pad);
rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad));
structure = gst_caps_get_structure (caps, 0);
- if (!ret)
+ if (!structure)
goto out;
if (gst_structure_get_uint (structure, "clock-base", &padpriv->clock_base)) {
padpriv->have_clock_base = TRUE;
}
- caps = gst_caps_make_writable (caps);
+ caps = gst_caps_copy (caps);
gst_caps_set_simple (caps,
"clock-base", G_TYPE_UINT, rtp_mux->ts_base,
"seqnum-base", G_TYPE_UINT, rtp_mux->seqnum_base, NULL);
- gst_caps_ref (caps);
-
GST_DEBUG_OBJECT (rtp_mux,
"setting caps %" GST_PTR_FORMAT " on src pad..", caps);
ret = gst_pad_set_caps (rtp_mux->srcpad, caps);