mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
opuspay: fix timestamps
Copy timestamps to payloaded buffer. Avoid input buffer memory leak. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692929
This commit is contained in:
parent
a78d56f28a
commit
de648b8832
1 changed files with 10 additions and 1 deletions
|
@ -107,9 +107,18 @@ gst_rtp_opus_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
||||||
GstBuffer * buffer)
|
GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
|
GstClockTime pts, dts, duration;
|
||||||
|
|
||||||
|
pts = GST_BUFFER_PTS (buffer);
|
||||||
|
dts = GST_BUFFER_DTS (buffer);
|
||||||
|
duration = GST_BUFFER_DURATION (buffer);
|
||||||
|
|
||||||
outbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
|
outbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
|
||||||
outbuf = gst_buffer_append (outbuf, gst_buffer_ref (buffer));
|
outbuf = gst_buffer_append (outbuf, buffer);
|
||||||
|
|
||||||
|
GST_BUFFER_PTS (outbuf) = pts;
|
||||||
|
GST_BUFFER_DTS (outbuf) = dts;
|
||||||
|
GST_BUFFER_DURATION (outbuf) = duration;
|
||||||
|
|
||||||
/* Push out */
|
/* Push out */
|
||||||
return gst_rtp_base_payload_push (basepayload, outbuf);
|
return gst_rtp_base_payload_push (basepayload, outbuf);
|
||||||
|
|
Loading…
Reference in a new issue