mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
aggregator: Ignore the "first" mode if the segment not a time segment
This commit is contained in:
parent
3030d1b501
commit
1b3f1b1a4e
1 changed files with 14 additions and 6 deletions
|
@ -1953,6 +1953,7 @@ gst_aggregator_pad_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
|
||||||
start_time = 0;
|
start_time = 0;
|
||||||
break;
|
break;
|
||||||
case GST_AGGREGATOR_START_TIME_SELECTION_FIRST:
|
case GST_AGGREGATOR_START_TIME_SELECTION_FIRST:
|
||||||
|
if (aggpad->segment.format == GST_FORMAT_TIME) {
|
||||||
start_time = GST_BUFFER_PTS (actual_buf);
|
start_time = GST_BUFFER_PTS (actual_buf);
|
||||||
if (start_time != -1) {
|
if (start_time != -1) {
|
||||||
start_time = MAX (start_time, aggpad->segment.start);
|
start_time = MAX (start_time, aggpad->segment.start);
|
||||||
|
@ -1960,6 +1961,13 @@ gst_aggregator_pad_chain (GstPad * pad, GstObject * object, GstBuffer * buffer)
|
||||||
gst_segment_to_running_time (&aggpad->segment, GST_FORMAT_TIME,
|
gst_segment_to_running_time (&aggpad->segment, GST_FORMAT_TIME,
|
||||||
start_time);
|
start_time);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
start_time = 0;
|
||||||
|
GST_WARNING_OBJECT (aggpad,
|
||||||
|
"Ignoring request of selecting the first start time "
|
||||||
|
"as the segment is a %s segment instead of a time segment",
|
||||||
|
gst_format_get_name (aggpad->segment.format));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GST_AGGREGATOR_START_TIME_SELECTION_SET:
|
case GST_AGGREGATOR_START_TIME_SELECTION_SET:
|
||||||
start_time = self->priv->start_time;
|
start_time = self->priv->start_time;
|
||||||
|
|
Loading…
Reference in a new issue