summaryrefslogtreecommitdiffstats
path: root/gst/rtpmux
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2008-08-11 21:03:22 -0400
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:48:54 +0100
commit38e339a1358251d4bc745b917517cf1c78e9bc92 (patch)
tree8873e7e2db57c17a51c441e442527415650f1f4f /gst/rtpmux
parent0b710c450a32c8a99e3f9775a027d99c91b88277 (diff)
downloadgst-plugins-bad-38e339a1358251d4bc745b917517cf1c78e9bc92.tar.gz
gst-plugins-bad-38e339a1358251d4bc745b917517cf1c78e9bc92.tar.bz2
gst-plugins-bad-38e339a1358251d4bc745b917517cf1c78e9bc92.zip
[MOVED FROM GST-P-FARSIGHT] Set seqnum-base and clock-base in caps from rtpmuxer
Diffstat (limited to 'gst/rtpmux')
-rw-r--r--gst/rtpmux/gstrtpmux.c19
1 files changed, 14 insertions, 5 deletions
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;