From 38e339a1358251d4bc745b917517cf1c78e9bc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 11 Aug 2008 21:03:22 -0400 Subject: [MOVED FROM GST-P-FARSIGHT] Set seqnum-base and clock-base in caps from rtpmuxer --- gst/rtpmux/gstrtpmux.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'gst/rtpmux') diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index b7bc7a08..23589861 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -416,12 +416,21 @@ gst_rtp_mux_setcaps (GstPad *pad, GstCaps *caps) ret = gst_rtp_mux_set_clock_rate (rtp_mux, clock_rate); } - if (ret) { - GST_DEBUG_OBJECT (rtp_mux, - "seting caps %" GST_PTR_FORMAT " on src pad..", caps); - ret = gst_pad_set_caps (rtp_mux->srcpad, caps); - } + if (!ret) + goto out; + + caps = gst_caps_make_writable (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_DEBUG_OBJECT (rtp_mux, + "seting caps %" GST_PTR_FORMAT " on src pad..", caps); + ret = gst_pad_set_caps (rtp_mux->srcpad, caps); + out: gst_object_unref (rtp_mux); return ret; -- cgit v1.2.1