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.
This commit is contained in:
Thibault Saunier 2012-04-05 10:22:29 -04:00
parent fdaa60c44f
commit 5e85aaf11d

View file

@ -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;
}