consolidated IOV_MAX/UIO_MAXIOV handling per GLib + legacy behaviour for osx/ios
[platform/upstream/gstreamer.git] / plugins / elements / gstinputselector.c
index 6cac245..25b4e7f 100644 (file)
@@ -666,7 +666,8 @@ gst_selector_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
     case GST_QUERY_CAPS:
     case GST_QUERY_POSITION:
     case GST_QUERY_DURATION:
-      /* always proxy caps/position/duration query, regardless of active pad or not
+    case GST_QUERY_CONTEXT:
+      /* always proxy caps/position/duration/context queries, regardless of active pad or not
        * See https://bugzilla.gnome.org/show_bug.cgi?id=775445 */
       res = gst_pad_peer_query (self->srcpad, query);
       break;
@@ -1586,7 +1587,6 @@ gst_input_selector_event (GstPad * pad, GstObject * parent, GstEvent * event)
 
 typedef struct
 {
-  guint count;
   gboolean live;
   GstClockTime min, max;
 } LatencyFoldData;
@@ -1618,8 +1618,7 @@ query_latency_default_fold (const GValue * item, GValue * ret,
     GST_LOG_OBJECT (pad, "got latency live:%s min:%" G_GINT64_FORMAT
         " max:%" G_GINT64_FORMAT, live ? "true" : "false", min, max);
 
-    /* FIXME : Why do we only take values into account if it's live ? */
-    if (live || fold_data->count == 0) {
+    if (live) {
       if (min > fold_data->min)
         fold_data->min = min;
 
@@ -1627,10 +1626,8 @@ query_latency_default_fold (const GValue * item, GValue * ret,
         fold_data->max = max;
       else if (max < fold_data->max)
         fold_data->max = max;
-
       fold_data->live = live;
     }
-    fold_data->count += 1;
   } else if (peer) {
     GST_DEBUG_OBJECT (pad, "latency query failed");
     g_value_set_boolean (ret, FALSE);
@@ -1664,7 +1661,6 @@ gst_input_selector_query_latency (GstInputSelector * sel, GstPad * pad,
   g_value_init (&ret, G_TYPE_BOOLEAN);
 
 retry:
-  fold_data.count = 0;
   fold_data.live = FALSE;
   fold_data.min = 0;
   fold_data.max = GST_CLOCK_TIME_NONE;