diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-01-31 12:30:49 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-02-17 14:58:00 +0000 |
commit | b310393916467e0a24d04c1372132773c371a2ed (patch) | |
tree | 9d0c25bfbd543837908c313404b7fb0f4a4ee0d3 | |
parent | 117e30c47e7241f1acf4b95b751ce2c8fb78a833 (diff) | |
download | gstreamer-plugins-good-b310393916467e0a24d04c1372132773c371a2ed.tar.gz |
opuspay: fix timestamps
Copy timestamps to payloaded buffer.
Avoid input buffer memory leak.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692929
-rw-r--r-- | gst/rtp/gstrtpopuspay.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/rtp/gstrtpopuspay.c b/gst/rtp/gstrtpopuspay.c index acebc8d9c..69ad51ec6 100644 --- a/gst/rtp/gstrtpopuspay.c +++ b/gst/rtp/gstrtpopuspay.c @@ -107,9 +107,18 @@ gst_rtp_opus_pay_handle_buffer (GstRTPBasePayload * basepayload, GstBuffer * buffer) { 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_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 */ return gst_rtp_base_payload_push (basepayload, outbuf); |