From 87ee22fe0e49d095dc15c90787d4cb5d028bee09 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 17 Jul 2012 16:39:02 +0200 Subject: [PATCH] update for RTP buffer api changes --- gst/dtmf/gstrtpdtmfdepay.c | 4 ---- gst/rtpmux/gstrtpmux.c | 13 ++++++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gst/dtmf/gstrtpdtmfdepay.c b/gst/dtmf/gstrtpdtmfdepay.c index 0dda885013..1bea465593 100644 --- a/gst/dtmf/gstrtpdtmfdepay.c +++ b/gst/dtmf/gstrtpdtmfdepay.c @@ -407,9 +407,6 @@ gst_rtp_dtmf_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) 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); @@ -423,7 +420,6 @@ gst_rtp_dtmf_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) if (dtmf_payload.event > MAX_EVENT) goto bad_packet; - marker = gst_rtp_buffer_get_marker (&rtpbuffer); timestamp = gst_rtp_buffer_get_timestamp (&rtpbuffer); diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index 20ed5a1c3b..7f69957d2c 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -469,12 +469,6 @@ gst_rtp_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) 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); @@ -486,7 +480,12 @@ gst_rtp_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) 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);