Commit 13376f88 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸 Committed by GStreamer Merge Bot

basetsmux: make use of gst_aggregator_finish_buffer_list

Fixes #1276

Part-of: <!1429>
parent 510e8ef8
Pipeline #175433 waiting for manual action with stages
in 58 seconds
...@@ -873,29 +873,6 @@ new_packet_common_init (GstBaseTsMux * mux, GstBuffer * buf, guint8 * data, ...@@ -873,29 +873,6 @@ new_packet_common_init (GstBaseTsMux * mux, GstBuffer * buf, guint8 * data,
} }
} }
static GstFlowReturn
finish_buffer_list (GstBaseTsMux * mux, GstBufferList * list)
{
guint i;
guint l = gst_buffer_list_length (list);
GstFlowReturn ret = GST_FLOW_OK;
for (i = 0; i < l; i++) {
GstBuffer *buf = gst_buffer_list_get (list, i);
ret =
gst_aggregator_finish_buffer (GST_AGGREGATOR (mux),
gst_buffer_ref (buf));
if (ret != GST_FLOW_OK)
break;
}
gst_buffer_list_unref (list);
return ret;
}
static GstFlowReturn static GstFlowReturn
gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force) gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force)
{ {
...@@ -917,7 +894,8 @@ gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force) ...@@ -917,7 +894,8 @@ gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force)
/* no alignment, just push all available data */ /* no alignment, just push all available data */
if (align == 0) { if (align == 0) {
buffer_list = gst_adapter_take_buffer_list (mux->out_adapter, av); buffer_list = gst_adapter_take_buffer_list (mux->out_adapter, av);
return finish_buffer_list (mux, buffer_list); return gst_aggregator_finish_buffer_list (GST_AGGREGATOR (mux),
buffer_list);
} }
align *= packet_size; align *= packet_size;
...@@ -993,7 +971,7 @@ gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force) ...@@ -993,7 +971,7 @@ gst_base_ts_mux_push_packets (GstBaseTsMux * mux, gboolean force)
gst_buffer_list_add (buffer_list, buf); gst_buffer_list_add (buffer_list, buf);
} }
return finish_buffer_list (mux, buffer_list); return gst_aggregator_finish_buffer_list (GST_AGGREGATOR (mux), buffer_list);
} }
static GstFlowReturn static GstFlowReturn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment