diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 300d23e7f1..e7013376ab 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -555,6 +555,22 @@ _gst_select_accumulator (GSignalInvocationHint * ihint, return FALSE; } +static gboolean +_gst_array_hasvalue_accumulator (GSignalInvocationHint * ihint, + GValue * return_accu, const GValue * handler_return, gpointer dummy) +{ + gpointer array; + + array = g_value_get_boxed (handler_return); + if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) + g_value_set_boxed (return_accu, array); + + if (array != NULL) + return FALSE; + + return TRUE; +} + static void gst_decode_bin_class_init (GstDecodeBinClass * klass) { @@ -681,8 +697,9 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass) gst_decode_bin_signals[SIGNAL_AUTOPLUG_SORT] = g_signal_new ("autoplug-sort", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDecodeBinClass, autoplug_sort), - NULL, NULL, gst_play_marshal_BOXED__OBJECT_BOXED_BOXED, - G_TYPE_VALUE_ARRAY, 3, GST_TYPE_PAD, GST_TYPE_CAPS, G_TYPE_VALUE_ARRAY); + _gst_array_hasvalue_accumulator, NULL, + gst_play_marshal_BOXED__OBJECT_BOXED_BOXED, G_TYPE_VALUE_ARRAY, 3, + GST_TYPE_PAD, GST_TYPE_CAPS, G_TYPE_VALUE_ARRAY); /** * GstDecodeBin2::autoplug-select: