collectpads2: always recording incoming segment info if no buffer_func set

This commit is contained in:
Mark Nauwelaerts 2012-04-17 12:23:05 +02:00
parent b642b87579
commit 5823dd4724

View file

@ -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) {