mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
souphttpsrc: fix metadata writable warnings
Set metadata on buffer first, when the refcount is still 1, and only ref again afterwards.
This commit is contained in:
parent
c007d8535c
commit
954064a8d6
1 changed files with 3 additions and 1 deletions
|
@ -1004,7 +1004,7 @@ gst_soup_http_src_got_chunk_cb (SoupMessage * msg, SoupBuffer * chunk,
|
|||
|
||||
/* Extract the GstBuffer from the SoupBuffer and set its fields. */
|
||||
*src->outbuf = GST_BUFFER_CAST (soup_buffer_get_owner (chunk));
|
||||
gst_buffer_ref (*src->outbuf);
|
||||
|
||||
GST_BUFFER_SIZE (*src->outbuf) = chunk->length;
|
||||
GST_BUFFER_OFFSET (*src->outbuf) = basesrc->segment.last_stop;
|
||||
|
||||
|
@ -1012,6 +1012,8 @@ gst_soup_http_src_got_chunk_cb (SoupMessage * msg, SoupBuffer * chunk,
|
|||
(src->src_caps) ? src->src_caps :
|
||||
GST_PAD_CAPS (GST_BASE_SRC_PAD (basesrc)));
|
||||
|
||||
gst_buffer_ref (*src->outbuf);
|
||||
|
||||
new_position = src->read_position + chunk->length;
|
||||
if (G_LIKELY (src->request_position == src->read_position))
|
||||
src->request_position = new_position;
|
||||
|
|
Loading…
Reference in a new issue