mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
rtpmpvpay: Fix RTP buffer allocation in rtpmpvpay
RTP buffer allocation should not be done with padding for the specific MPEG2 header as the padding is done at the end of the buffer and the last byte is the size of the padding. https://bugzilla.gnome.org/show_bug.cgi?id=706970
This commit is contained in:
parent
f7528d274b
commit
d851b8a8b4
1 changed files with 4 additions and 2 deletions
|
@ -180,14 +180,16 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay)
|
|||
GstRTPBuffer rtp = { NULL };
|
||||
GstBuffer *paybuf;
|
||||
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (avail, 4, 0);
|
||||
packet_len = gst_rtp_buffer_calc_packet_len (avail + 4, 0, 0);
|
||||
|
||||
towrite = MIN (packet_len, GST_RTP_BASE_PAYLOAD_MTU (rtpmpvpay));
|
||||
|
||||
payload_len = gst_rtp_buffer_calc_payload_len (towrite, 4, 0);
|
||||
payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0);
|
||||
|
||||
outbuf = gst_rtp_buffer_new_allocate (4, 0, 0);
|
||||
|
||||
payload_len -= 4;
|
||||
|
||||
gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);
|
||||
|
||||
payload = gst_rtp_buffer_get_payload (&rtp);
|
||||
|
|
Loading…
Reference in a new issue