diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-29 11:56:10 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-29 11:56:10 +0200 |
commit | 92b0f32d74f620518ba8569f63cf57c8682ff9a8 (patch) | |
tree | 994b3296ba456cf6b7ff13e55edf248c06f66c25 /libs | |
parent | 939f6045b10eb810384fec87c4a5215a7a644eb9 (diff) |
bufferlist: use faster gst_buffer_list_get()
Use the faster gst_buffer_list_get() to get the first buffer of a list.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gst/base/gstbasesink.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index a72807474..780fc3f72 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -2660,14 +2660,7 @@ gst_base_sink_render_object (GstBaseSink * basesink, GstPad * pad, * If buffer list, use the first group buffer within the list * for syncing */ - GstBufferListIterator *it; - gboolean got_group; - - it = gst_buffer_list_iterate (GST_BUFFER_LIST_CAST (obj)); - got_group = gst_buffer_list_iterator_next_group (it); - g_assert (got_group); - sync_obj = gst_buffer_list_iterator_next (it); - gst_buffer_list_iterator_free (it); + sync_obj = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0, 0); g_assert (NULL != sync_obj); } else { sync_obj = obj; @@ -2850,14 +2843,7 @@ gst_base_sink_preroll_object (GstBaseSink * basesink, gboolean is_list, GstClockTime timestamp; if (is_list) { - GstBufferListIterator *it; - gboolean got_group; - - it = gst_buffer_list_iterate (GST_BUFFER_LIST_CAST (obj)); - got_group = gst_buffer_list_iterator_next_group (it); - g_assert (got_group); - buf = gst_buffer_list_iterator_next (it); - gst_buffer_list_iterator_free (it); + buf = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0, 0); g_assert (NULL != buf); } else { buf = GST_BUFFER_CAST (obj); @@ -3277,14 +3263,7 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, GstPad * pad, goto was_eos; if (is_list) { - GstBufferListIterator *it; - gboolean got_group; - - it = gst_buffer_list_iterate (GST_BUFFER_LIST_CAST (obj)); - got_group = gst_buffer_list_iterator_next_group (it); - g_assert (got_group); - time_buf = gst_buffer_list_iterator_next (it); - gst_buffer_list_iterator_free (it); + time_buf = gst_buffer_list_get (GST_BUFFER_LIST_CAST (obj), 0, 0); g_assert (NULL != time_buf); } else { time_buf = GST_BUFFER_CAST (obj); |