rtpdtmfdepay = GST_RTP_DTMF_DEPAY (depayload);
- if (!gst_rtp_buffer_validate (buf))
- goto bad_packet;
-
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuffer);
payload_len = gst_rtp_buffer_get_payload_len (&rtpbuffer);
if (dtmf_payload.event > MAX_EVENT)
goto bad_packet;
-
marker = gst_rtp_buffer_get_marker (&rtpbuffer);
timestamp = gst_rtp_buffer_get_timestamp (&rtpbuffer);
rtp_mux = GST_RTP_MUX (GST_OBJECT_PARENT (pad));
- if (!gst_rtp_buffer_validate (buffer)) {
- gst_buffer_unref (buffer);
- GST_ERROR_OBJECT (rtp_mux, "Invalid RTP buffer");
- return GST_FLOW_ERROR;
- }
-
GST_OBJECT_LOCK (rtp_mux);
padpriv = gst_pad_get_element_private (pad);
buffer = gst_buffer_make_writable (buffer);
- gst_rtp_buffer_map (buffer, GST_MAP_READWRITE, &rtpbuffer);
+ if (!gst_rtp_buffer_map (buffer, GST_MAP_READWRITE, &rtpbuffer)) {
+ GST_OBJECT_UNLOCK (rtp_mux);
+ gst_buffer_unref (buffer);
+ GST_ERROR_OBJECT (rtp_mux, "Invalid RTP buffer");
+ return GST_FLOW_ERROR;
+ }
drop = !process_buffer_locked (rtp_mux, padpriv, &rtpbuffer);