Commit 30a3fe53 authored by Philippe Normand's avatar Philippe Normand 🥑

utils: Set default values for position and duration query results

https://bugzilla.gnome.org/show_bug.cgi?id=797066
parent d7c87910
......@@ -2428,6 +2428,9 @@ gst_element_query_position (GstElement * element, GstFormat format,
GstQuery *query;
gboolean ret;
if (cur != NULL)
*cur = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......@@ -2466,6 +2469,9 @@ gst_element_query_duration (GstElement * element, GstFormat format,
GstQuery *query;
gboolean ret;
if (duration != NULL)
*duration = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......@@ -2836,6 +2842,9 @@ gst_pad_query_position (GstPad * pad, GstFormat format, gint64 * cur)
GstQuery *query;
gboolean ret;
if (cur != NULL)
*cur = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......@@ -2865,6 +2874,9 @@ gst_pad_peer_query_position (GstPad * pad, GstFormat format, gint64 * cur)
GstQuery *query;
gboolean ret = FALSE;
if (cur != NULL)
*cur = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......@@ -2893,6 +2905,9 @@ gst_pad_query_duration (GstPad * pad, GstFormat format, gint64 * duration)
GstQuery *query;
gboolean ret;
if (duration != NULL)
*duration = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......@@ -2922,6 +2937,9 @@ gst_pad_peer_query_duration (GstPad * pad, GstFormat format, gint64 * duration)
GstQuery *query;
gboolean ret = FALSE;
if (duration != NULL)
*duration = GST_CLOCK_TIME_NONE;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (GST_PAD_IS_SINK (pad), FALSE);
g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
......
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