mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
collectpads2: always recording incoming segment info if no buffer_func set
This commit is contained in:
parent
b642b87579
commit
5823dd4724
1 changed files with 6 additions and 5 deletions
|
@ -1814,22 +1814,23 @@ gst_collect_pads2_event (GstPad * pad, GstEvent * event)
|
||||||
", stop %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
|
", stop %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
|
||||||
GST_TIME_ARGS (stop));
|
GST_TIME_ARGS (stop));
|
||||||
|
|
||||||
/* default muxing functionality */
|
|
||||||
if (!buffer_func)
|
|
||||||
goto newsegment_done;
|
|
||||||
|
|
||||||
/* default collection can not handle other segment formats than time */
|
/* 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 "
|
GST_WARNING_OBJECT (pads, "GstCollectPads2 default collecting "
|
||||||
"can only handle time segments. Non time segment ignored.");
|
"can only handle time segments. Non time segment ignored.");
|
||||||
goto newsegment_done;
|
goto newsegment_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* accept segment */
|
||||||
gst_segment_set_newsegment_full (&data->segment, update, rate, arate,
|
gst_segment_set_newsegment_full (&data->segment, update, rate, arate,
|
||||||
format, start, stop, time);
|
format, start, stop, time);
|
||||||
|
|
||||||
GST_COLLECT_PADS2_STATE_SET (data, GST_COLLECT_PADS2_STATE_NEW_SEGMENT);
|
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;
|
/* If oldest time is not known, or current pad got newsegment;
|
||||||
* recalculate the state */
|
* recalculate the state */
|
||||||
if (!pads->priv->earliest_data || pads->priv->earliest_data == data) {
|
if (!pads->priv->earliest_data || pads->priv->earliest_data == data) {
|
||||||
|
|
Loading…
Reference in a new issue