From: Yasushi SHOJI Date: Fri, 7 Jul 2017 12:15:57 +0000 (+0900) Subject: rtpgsmpay: fix accidental garbage data before actual payload X-Git-Tag: 1.12.2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05180996fceb8183790c81a1ab520dde471ac083;p=platform%2Fupstream%2Fgst-plugins-good.git rtpgsmpay: fix accidental garbage data before actual payload Do not allocate payload size outbuf if appending payload buffer. The commit 137672ff1824948bda4b1b1967de8c24a0055b67 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 https://bugzilla.gnome.org/show_bug.cgi?id=784616 --- diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index 93888d7..05f19df 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -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;