Message info
 
To:gstreamer-commits@lists.freedesktop.org From:Thibault Saunier Subject:gst-plugins-bad: hls: Do not add reference to buffers passed in GstFragment Date:Thu, 5 Apr 2012 14:15:51 -0700 (PDT)
 

Module: gst-plugins-bad
Branch: master
Commit: 5e85aaf11db9d2723e0ea01077ae34860a09da05
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5e85aaf11db9d2723e0ea01077ae34860a09da05

Author: Thibault Saunier <thibault.saunier@collabora.com>
Date: Thu Apr 5 10:22:29 2012 -0400

hls: Do not add reference to buffers passed in GstFragment

We just steal the reference to the buffer, which means we can keep writing metadatas
on the buffers.

---

gst/hls/gstfragment.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/hls/gstfragment.c b/gst/hls/gstfragment.c
index 2e09e34..00a3b4c 100644
--- a/gst/hls/gstfragment.c
+++ b/gst/hls/gstfragment.c
@@ -193,7 +193,7 @@ gst_fragment_set_headers (GstFragment * fragment, GstBuffer ** buffer,
return FALSE;

for (i = 0; i < count; i++) {
- gst_buffer_ref (buffer[i]);
+ /* We steal the buffers you pass in */
gst_buffer_list_iterator_add (fragment->priv->buffer_iterator, buffer[i]);
gst_buffer_list_iterator_add_group (fragment->priv->buffer_iterator);
}
@@ -216,7 +216,7 @@ gst_fragment_add_buffer (GstFragment * fragment, GstBuffer * buffer)
fragment->priv->headers_set = TRUE;

GST_DEBUG ("Adding new buffer to the fragment");
- gst_buffer_ref (buffer);
+ /* We steal the buffers you pass in */
gst_buffer_list_iterator_add (fragment->priv->buffer_iterator, buffer);
return TRUE;
}

_______________________________________________
gstreamer-commits mailing list
gstreamer-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits