summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-04-17 17:58:58 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-04-17 17:58:58 +0200
commit27cf71e20958889d279eb11805434e365cbe33c8 (patch)
treefc92772e1d8c2f11096d438c030ad2587c6eb27a
parent5dba8dfe593819a1bffe16320cb95845c67eb422 (diff)
rtprtxsend: Require clock-rate in the caps and handle no ssrc in the caps properly
-rw-r--r--gst/rtpmanager/gstrtprtxsend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtprtxsend.c b/gst/rtpmanager/gstrtprtxsend.c
index 5addbe4ce..922fad3b2 100644
--- a/gst/rtpmanager/gstrtprtxsend.c
+++ b/gst/rtpmanager/gstrtprtxsend.c
@@ -74,7 +74,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/x-rtp")
+ GST_STATIC_CAPS ("application/x-rtp, " "clock-rate = (int) [1, MAX]")
);
static gboolean gst_rtp_rtx_send_queue_check_full (GstDataQueue * queue,
@@ -592,7 +592,8 @@ gst_rtp_rtx_send_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
g_assert (gst_caps_is_fixed (caps));
s = gst_caps_get_structure (caps, 0);
- gst_structure_get_uint (s, "ssrc", &ssrc);
+ if (!gst_structure_get_uint (s, "ssrc", &ssrc))
+ ssrc = -1;
GST_OBJECT_LOCK (rtx);
data = gst_rtp_rtx_send_get_ssrc_data (rtx, ssrc);