diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-12-12 13:59:33 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-12-12 14:00:22 +0000 |
commit | 63110cab94b56605e8df06b4295bf23544d5ed58 (patch) | |
tree | 35493f14b8c0baeeeb3426f6c0f906c0f2abdc42 /gst/liveadder | |
parent | 70d13bbb328984469a09491808dae1ab2c16443c (diff) | |
download | gstreamer-plugins-bad-63110cab94b56605e8df06b4295bf23544d5ed58.tar.gz |
liveadder: fix buffer leak
Diffstat (limited to 'gst/liveadder')
-rw-r--r-- | gst/liveadder/liveadder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index ada42a547..205bd020d 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -1091,10 +1091,11 @@ gst_live_live_adder_chain (GstPad * pad, GstBuffer * buffer) if (skip) { GstClockTime subbuffer_duration = GST_BUFFER_DURATION (buffer) - skip; GstClockTime subbuffer_ts = GST_BUFFER_TIMESTAMP (buffer) + skip; - - buffer = gst_buffer_create_sub (buffer, + GstBuffer *new_buffer = gst_buffer_create_sub (buffer, gst_live_adder_length_from_duration (adder, skip), gst_live_adder_length_from_duration (adder, subbuffer_duration)); + gst_buffer_unref (buffer); + buffer = new_buffer; GST_BUFFER_TIMESTAMP (buffer) = subbuffer_ts; GST_BUFFER_DURATION (buffer) = subbuffer_duration; } |