basesink: Only answer the SEGMENT query in pull mode

Otherwise the element handling the seeks should answer this query.

Fixes bug #623622.
This commit is contained in:
Sebastian Dröge 2010-07-06 10:13:04 +02:00
parent e2db318921
commit b2e7c4bd45

View file

@ -4741,10 +4741,13 @@ gst_base_sink_query (GstElement * element, GstQuery * query)
break; break;
case GST_QUERY_SEGMENT: case GST_QUERY_SEGMENT:
{ {
/* FIXME, bring start/stop to stream time */ if (basesink->pad_mode == GST_ACTIVATE_PULL) {
gst_query_set_segment (query, basesink->segment.rate, gst_query_set_segment (query, basesink->segment.rate,
GST_FORMAT_TIME, basesink->segment.start, basesink->segment.stop); GST_FORMAT_TIME, basesink->segment.start, basesink->segment.stop);
res = TRUE; res = TRUE;
} else {
res = gst_pad_peer_query (basesink->sinkpad, query);
}
break; break;
} }
case GST_QUERY_SEEKING: case GST_QUERY_SEEKING: