srtpenc: Remove ssrc parsing from stream

It's no longer used
This commit is contained in:
Olivier Crête 2014-05-02 17:14:14 -04:00
parent 98f8bf46df
commit 2906fae146

View file

@ -221,8 +221,6 @@ static void gst_srtp_enc_release_pad (GstElement * element, GstPad * pad);
struct GstSrtpEncPads struct GstSrtpEncPads
{ {
guint ssrc;
GstPad *sinkpad; GstPad *sinkpad;
GstPad *srcpad; GstPad *srcpad;
}; };
@ -906,7 +904,6 @@ gst_srtp_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
gint size_max, size; gint size_max, size;
GstBuffer *bufout = NULL; GstBuffer *bufout = NULL;
struct GstSrtpEncPads *priv = gst_pad_get_element_private (pad); struct GstSrtpEncPads *priv = gst_pad_get_element_private (pad);
guint32 ssrc;
gboolean do_setcaps = FALSE; gboolean do_setcaps = FALSE;
GstMapInfo mapin, mapout; GstMapInfo mapin, mapout;
@ -923,14 +920,17 @@ gst_srtp_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
goto out; goto out;
} }
ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
gst_rtp_buffer_unmap (&rtpbuf); gst_rtp_buffer_unmap (&rtpbuf);
} else if (!rtcp_buffer_get_ssrc (buf, &ssrc)) { } else {
GST_ELEMENT_ERROR (filter, STREAM, WRONG_TYPE, (NULL), GstRTCPBuffer rtcpbuf = GST_RTCP_BUFFER_INIT;
("No SSRC found in buffer, dropping"));
ret = GST_FLOW_ERROR; if (!gst_rtcp_buffer_map (buf, GST_MAP_READ, &rtcpbuf)) {
goto out; GST_ELEMENT_ERROR (filter, STREAM, WRONG_TYPE, (NULL),
("Could not map RTCP buffer"));
ret = GST_FLOW_ERROR;
goto out;
}
gst_rtcp_buffer_unmap (&rtcpbuf);
} }
do_setcaps = filter->key_changed; do_setcaps = filter->key_changed;
@ -946,8 +946,6 @@ gst_srtp_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf,
goto out; goto out;
} }
} }
priv->ssrc = ssrc;
GST_OBJECT_LOCK (filter); GST_OBJECT_LOCK (filter);
/* Update source caps if asked */ /* Update source caps if asked */