From 5823dd472480d04f687045f5424a670310bcd807 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 17 Apr 2012 12:23:05 +0200 Subject: [PATCH] collectpads2: always recording incoming segment info if no buffer_func set --- libs/gst/base/gstcollectpads2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/gst/base/gstcollectpads2.c b/libs/gst/base/gstcollectpads2.c index 9368e38..7bf4ec6 100644 --- a/libs/gst/base/gstcollectpads2.c +++ b/libs/gst/base/gstcollectpads2.c @@ -1814,22 +1814,23 @@ gst_collect_pads2_event (GstPad * pad, GstEvent * event) ", stop %" GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); - /* default muxing functionality */ - if (!buffer_func) - goto newsegment_done; - /* default collection can not handle other segment formats than time */ - if (format != GST_FORMAT_TIME) { + if (buffer_func && format != GST_FORMAT_TIME) { GST_WARNING_OBJECT (pads, "GstCollectPads2 default collecting " "can only handle time segments. Non time segment ignored."); goto newsegment_done; } + /* accept segment */ gst_segment_set_newsegment_full (&data->segment, update, rate, arate, format, start, stop, time); GST_COLLECT_PADS2_STATE_SET (data, GST_COLLECT_PADS2_STATE_NEW_SEGMENT); + /* default muxing functionality */ + if (!buffer_func) + goto newsegment_done; + /* If oldest time is not known, or current pad got newsegment; * recalculate the state */ if (!pads->priv->earliest_data || pads->priv->earliest_data == data) { -- 2.7.4