From 9b15f9c6a12a8d20fcce1844e4fba8f3df466404 Mon Sep 17 00:00:00 2001 From: Alexey Fisher Date: Fri, 8 Apr 2011 11:13:07 +0200 Subject: [PATCH] rtpspeexpay: Do not transmitt samples with GAP flag If we get GAP samples, there is no need to transmitt it. In some situations, microphone is muted, we can drop net traffick usage to ~1 kbit/s. Without patch it will stay ~20 kbit/s --- gst/rtp/gstrtpspeexpay.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c index a551fa9439..35273e25af 100644 --- a/gst/rtp/gstrtpspeexpay.c +++ b/gst/rtp/gstrtpspeexpay.c @@ -260,6 +260,11 @@ gst_rtp_speex_pay_handle_buffer (GstBaseRTPPayload * basepayload, break; } + if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP)) { + ret = GST_FLOW_OK; + goto done; + } + timestamp = GST_BUFFER_TIMESTAMP (buffer); duration = GST_BUFFER_DURATION (buffer);