mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
tests: collectpads: tweak stub _collect to push all buffers
https://bugzilla.gnome.org/show_bug.cgi?id=708416
This commit is contained in:
parent
01b4565a9a
commit
d063623851
1 changed files with 15 additions and 7 deletions
|
@ -69,13 +69,24 @@ gst_agregator_collected (GstCollectPads * pads, gpointer user_data)
|
|||
{
|
||||
GstAggregator *aggregator = GST_AGGREGATOR (user_data);
|
||||
GstBuffer *inbuf;
|
||||
GstCollectData *collect_data = (GstCollectData *) pads->data->data;
|
||||
guint outsize = gst_collect_pads_available (pads);
|
||||
GstCollectData *collect_data = NULL;
|
||||
guint outsize = 0;
|
||||
GSList *walk;
|
||||
|
||||
walk = pads->data;
|
||||
for (walk = pads->data; walk; walk = walk->next) {
|
||||
GstCollectData *tmp = (GstCollectData *) walk->data;
|
||||
if (tmp->buffer) {
|
||||
collect_data = tmp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* can only happen when no pads to collect or all EOS */
|
||||
if (outsize == 0)
|
||||
if (collect_data == NULL)
|
||||
goto eos;
|
||||
|
||||
outsize = gst_buffer_get_size (collect_data->buffer);
|
||||
inbuf = gst_collect_pads_take_buffer (pads, collect_data, outsize);
|
||||
if (!inbuf)
|
||||
goto eos;
|
||||
|
@ -597,9 +608,6 @@ GST_START_TEST (test_collect_twice)
|
|||
/* now both pads have a buffer */
|
||||
fail_unless_collected (TRUE);
|
||||
|
||||
fail_unless (outbuf1 == buf1);
|
||||
fail_unless (outbuf2 == buf2);
|
||||
|
||||
/* these will return immediately as at this point the threads have been
|
||||
* unlocked and are finished */
|
||||
g_thread_join (thread1);
|
||||
|
@ -762,7 +770,7 @@ GST_START_TEST (test_branched_pipeline)
|
|||
gst_message_unref (msg);
|
||||
|
||||
/* we have two branches, but we still only forward buffers from one branch */
|
||||
fail_unless_equals_int (count, NUM_BUFFERS);
|
||||
fail_unless_equals_int (count, NUM_BUFFERS * 2);
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref (bus);
|
||||
|
|
Loading…
Reference in a new issue