Commit 7bce030b authored by Seungha Yang's avatar Seungha Yang Committed by Tim-Philipp Müller

qtdemux: Fix build with GLib versions < 2.54

g_ptr_array_find_with_equal_func was introduced in glib 2.54
which is a higher version than our minimum required one.
parent 13aa8059
......@@ -12507,6 +12507,33 @@ qtdemux_reuse_and_configure_stream (GstQTDemux * qtdemux,
return gst_qtdemux_configure_stream (qtdemux, newstream);
/* g_ptr_array_find_with_equal_func is available since 2.54,
* replacement until we can depend unconditionally on the real one in GLib */
#define g_ptr_array_find_with_equal_func qtdemux_ptr_array_find_with_equal_func
static gboolean
qtdemux_ptr_array_find_with_equal_func (GPtrArray * haystack,
gconstpointer needle, GEqualFunc equal_func, guint * index_)
guint i;
g_return_val_if_fail (haystack != NULL, FALSE);
if (equal_func == NULL)
equal_func = g_direct_equal;
for (i = 0; i < haystack->len; i++) {
if (equal_func (g_ptr_array_index (haystack, i), needle)) {
if (index_ != NULL)
*index_ = i;
return TRUE;
return FALSE;
static gboolean
qtdemux_update_streams (GstQTDemux * qtdemux)
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