videoaggregator: remove broken rate adjustment

The start_time and end_time in this context have already
been adjusted for the input's rate by converting them to running
time above. What is needed afterwards is to compare these
with the output's start/stop running time, which also takes
into account the rate, so we are comparing equal things.

Multiplying these with the output's rate here is only breaking
this logic. In most cases the input and output rate is the same,
so this multiplication effectively reverses the rate adjustment
that happened while converting to running time, which is why
we see the video playing with the original rate in tests.

Fixes #541
This commit is contained in:
George Kiagiadakis 2018-12-07 18:07:42 +02:00
parent f65a05b27f
commit 358ed9f9b4

View file

@ -1383,12 +1383,10 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
GstClockTime output_start_running_time,
GstClockTime output_end_running_time)
{
GstAggregator *agg = GST_AGGREGATOR (vagg);
GList *l;
gboolean eos = TRUE;
gboolean need_more_data = FALSE;
gboolean need_reconfigure = FALSE;
GstSegment *agg_segment = &GST_AGGREGATOR_PAD (agg->srcpad)->segment;
/* get a set of buffers into pad->priv->buffer that are within output_start_running_time
* and output_end_running_time taking into account finished and unresponsive pads */
@ -1496,12 +1494,6 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
gst_segment_to_running_time (&segment, GST_FORMAT_TIME, end_time);
g_assert (start_time != -1 && end_time != -1);
/* Convert to the output segment rate */
if (ABS (agg_segment->rate) != 1.0) {
start_time *= ABS (agg_segment->rate);
end_time *= ABS (agg_segment->rate);
}
GST_TRACE_OBJECT (pad, "dealing with buffer %p start %" GST_TIME_FORMAT
" end %" GST_TIME_FORMAT " out start %" GST_TIME_FORMAT
" out end %" GST_TIME_FORMAT, buf, GST_TIME_ARGS (start_time),