mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 06:16:36 +00:00
rtph264pay: pre-allocate bufferlist of the right size
To avoid unnecessary re-allocs.
This commit is contained in:
parent
c7c72c00b1
commit
01ee993d8d
1 changed files with 1 additions and 1 deletions
|
@ -869,7 +869,7 @@ gst_rtp_h264_pay_payload_nal (GstRTPBasePayload * basepayload,
|
||||||
/* We keep 2 bytes for FU indicator and FU Header */
|
/* We keep 2 bytes for FU indicator and FU Header */
|
||||||
payload_len = gst_rtp_buffer_calc_payload_len (mtu - 2, 0, 0);
|
payload_len = gst_rtp_buffer_calc_payload_len (mtu - 2, 0, 0);
|
||||||
|
|
||||||
list = gst_buffer_list_new ();
|
list = gst_buffer_list_new_sized ((size / payload_len) + 1);
|
||||||
|
|
||||||
while (end == 0) {
|
while (end == 0) {
|
||||||
limitedSize = size < payload_len ? size : payload_len;
|
limitedSize = size < payload_len ? size : payload_len;
|
||||||
|
|
Loading…
Reference in a new issue