Commit 6347ec52 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

rtpjp2kpay: pre-allocate buffer-list of the right size

parent ccb73806
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment