audioaggregator: Use stream time in the position query instead of segment position
authorSebastian Dröge <sebastian@centricular.com>
Fri, 11 Sep 2015 14:56:40 +0000 (16:56 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 14 Sep 2015 17:56:51 +0000 (19:56 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=753196

gst/audiomixer/gstaudioaggregator.c

index ca06a66..3b59a42 100644 (file)
@@ -578,8 +578,9 @@ gst_audio_aggregator_src_query (GstAggregator * agg, GstQuery * query)
 
       switch (format) {
         case GST_FORMAT_TIME:
-          /* FIXME, bring to stream time, might be tricky */
-          gst_query_set_position (query, format, agg->segment.position);
+          gst_query_set_position (query, format,
+              gst_segment_to_stream_time (&agg->segment, GST_FORMAT_TIME,
+                  agg->segment.position));
           res = TRUE;
           break;
         case GST_FORMAT_BYTES: