mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtpjp2kpay: pre-allocate buffer-list of the right size
This commit is contained in:
parent
ccb7380689
commit
6347ec522d
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue