mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
basedepay: fix refcounting issue
Make sure that when _make_writable() returns a new buffer, we actually push that one instead of the old one.
This commit is contained in:
parent
85cafac6af
commit
c665034742
1 changed files with 7 additions and 7 deletions
|
@ -559,11 +559,11 @@ gst_base_rtp_depayload_prepare_push (GstBaseRTPDepayload * filter,
|
||||||
data.bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
|
data.bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
|
||||||
|
|
||||||
if (is_list) {
|
if (is_list) {
|
||||||
gst_buffer_list_foreach (GST_BUFFER_LIST_CAST (obj),
|
GstBufferList **blist = obj;
|
||||||
(GstBufferListFunc) set_headers, &data);
|
gst_buffer_list_foreach (*blist, (GstBufferListFunc) set_headers, &data);
|
||||||
} else {
|
} else {
|
||||||
GstBuffer *buf = GST_BUFFER_CAST (obj);
|
GstBuffer **buf = obj;
|
||||||
set_headers (&buf, 0, 0, &data);
|
set_headers (buf, 0, 0, &data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if this is the first buffer send a NEWSEGMENT */
|
/* if this is the first buffer send a NEWSEGMENT */
|
||||||
|
@ -605,7 +605,7 @@ gst_base_rtp_depayload_push_ts (GstBaseRTPDepayload * filter, guint32 timestamp,
|
||||||
|
|
||||||
res =
|
res =
|
||||||
gst_base_rtp_depayload_prepare_push (filter, TRUE, timestamp, FALSE,
|
gst_base_rtp_depayload_prepare_push (filter, TRUE, timestamp, FALSE,
|
||||||
out_buf);
|
&out_buf);
|
||||||
|
|
||||||
if (G_LIKELY (res == GST_FLOW_OK))
|
if (G_LIKELY (res == GST_FLOW_OK))
|
||||||
res = gst_pad_push (filter->srcpad, out_buf);
|
res = gst_pad_push (filter->srcpad, out_buf);
|
||||||
|
@ -634,7 +634,7 @@ gst_base_rtp_depayload_push (GstBaseRTPDepayload * filter, GstBuffer * out_buf)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
|
||||||
res = gst_base_rtp_depayload_prepare_push (filter, FALSE, 0, FALSE, out_buf);
|
res = gst_base_rtp_depayload_prepare_push (filter, FALSE, 0, FALSE, &out_buf);
|
||||||
|
|
||||||
if (G_LIKELY (res == GST_FLOW_OK))
|
if (G_LIKELY (res == GST_FLOW_OK))
|
||||||
res = gst_pad_push (filter->srcpad, out_buf);
|
res = gst_pad_push (filter->srcpad, out_buf);
|
||||||
|
@ -662,7 +662,7 @@ gst_base_rtp_depayload_push_list (GstBaseRTPDepayload * filter,
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
|
||||||
res = gst_base_rtp_depayload_prepare_push (filter, TRUE, 0, TRUE, out_list);
|
res = gst_base_rtp_depayload_prepare_push (filter, TRUE, 0, TRUE, &out_list);
|
||||||
|
|
||||||
if (G_LIKELY (res == GST_FLOW_OK))
|
if (G_LIKELY (res == GST_FLOW_OK))
|
||||||
res = gst_pad_push_list (filter->srcpad, out_list);
|
res = gst_pad_push_list (filter->srcpad, out_list);
|
||||||
|
|
Loading…
Reference in a new issue