projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7c72c0
)
rtph264pay: pre-allocate bufferlist of the right size
author
Tim-Philipp Müller
<tim@centricular.com>
Wed, 18 Jun 2014 06:52:05 +0000
(07:52 +0100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Wed, 18 Jun 2014 13:54:58 +0000
(14:54 +0100)
To avoid unnecessary re-allocs.
gst/rtp/gstrtph264pay.c
patch
|
blob
|
history
diff --git
a/gst/rtp/gstrtph264pay.c
b/gst/rtp/gstrtph264pay.c
index 1ad76687a89c80b17d06c19b6a16b9761b315f64..7c6c821a5f08b188cf163ce8b174be9cc0b8a785 100644
(file)
--- a/
gst/rtp/gstrtph264pay.c
+++ b/
gst/rtp/gstrtph264pay.c
@@
-869,7
+869,7
@@
gst_rtp_h264_pay_payload_nal (GstRTPBasePayload * basepayload,
/* We keep 2 bytes for FU indicator and FU Header */
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) {
limitedSize = size < payload_len ? size : payload_len;