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
This commit is contained in:
Alexey Fisher 2011-04-08 11:13:07 +02:00 committed by Sebastian Dröge
parent 0016ceaa2b
commit 9b15f9c6a1

View file

@ -260,6 +260,11 @@ gst_rtp_speex_pay_handle_buffer (GstBaseRTPPayload * basepayload,
break; break;
} }
if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_GAP)) {
ret = GST_FLOW_OK;
goto done;
}
timestamp = GST_BUFFER_TIMESTAMP (buffer); timestamp = GST_BUFFER_TIMESTAMP (buffer);
duration = GST_BUFFER_DURATION (buffer); duration = GST_BUFFER_DURATION (buffer);