Commit c7f42cc3 authored by Yasushi SHOJI's avatar Yasushi SHOJI Committed by Tim-Philipp Müller

rtpgsmpay: fix accidental garbage data before actual payload

Do not allocate payload size outbuf if appending payload buffer.

The commit 137672ff attached payload
to the output buffer but forgot to remove payload allocation.  That
effectively doubled payload size and add zero'ed or random bytes.

Makes the following pipeline work again:

gst-launch-1.0 -v audiotestsrc wave=2 ! gsmenc ! rtpgsmpay ! rtpgsmdepay ! gsmdec ! autoaudiosink
parent 286df32e
......@@ -145,7 +145,7 @@ gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * basepayload,
if (payload_len > GST_RTP_BASE_PAYLOAD_MTU (rtpgsmpay))
goto too_big;
outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0);
outbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
/* copy timestamp and duration */
GST_BUFFER_PTS (outbuf) = timestamp;
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