projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccb7380
)
rtpjp2kpay: pre-allocate buffer-list of the right size
author
Tim-Philipp Müller
<tim@centricular.com>
Wed, 18 Jun 2014 13:38:55 +0000
(14:38 +0100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Wed, 18 Jun 2014 13:54:59 +0000
(14:54 +0100)
gst/rtp/gstrtpj2kpay.c
patch
|
blob
|
history
diff --git
a/gst/rtp/gstrtpj2kpay.c
b/gst/rtp/gstrtpj2kpay.c
index
6cefc31
..
98880b2
100644
(file)
--- a/
gst/rtp/gstrtpj2kpay.c
+++ b/
gst/rtp/gstrtpj2kpay.c
@@
-353,11
+353,11
@@
gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * basepayload,
state.next_sot = 0;
state.force_packet = FALSE;
- list = gst_buffer_list_new ();
-
/* get max packet length */
max_size = gst_rtp_buffer_calc_payload_len (mtu - HEADER_SIZE, 0, 0);
+ list = gst_buffer_list_new_sized ((mtu / max_size) + 1);
+
do {
GstBuffer *outbuf;
guint8 *header;