libs/gst/base/gstbasesink.c: Can't use gst_segment_to_running_time() when the segment is not in GST_TIME_FORMAT (like...

Original commit message from CVS:
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Can't use gst_segment_to_running_time() when the segment
is not in GST_TIME_FORMAT (like with filesink, for example).
Stops flac encoding pipelines from spewing critical warnings
at EOS (#331248).
This commit is contained in:
Tim-Philipp Müller 2006-03-14 18:25:54 +00:00
parent e2b2ce11f1
commit 9394a81b82
2 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Can't use gst_segment_to_running_time() when the segment
is not in GST_TIME_FORMAT (like with filesink, for example).
Stops flac encoding pipelines from spewing critical warnings
at EOS (#331248).
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstpipeline.c: (gst_pipeline_class_init):

View file

@ -767,11 +767,17 @@ gst_base_sink_get_sync_times (GstBaseSink * basesink, GstMiniObject * obj,
}
}
*start =
gst_segment_to_running_time (&basesink->segment, GST_FORMAT_TIME, cstart);
*stop =
gst_segment_to_running_time (&basesink->segment, GST_FORMAT_TIME, cstop);
if (G_LIKELY (basesink->segment.format == GST_FORMAT_TIME)) {
*start =
gst_segment_to_running_time (&basesink->segment, GST_FORMAT_TIME,
cstart);
*stop =
gst_segment_to_running_time (&basesink->segment, GST_FORMAT_TIME,
cstop);
} else {
*start = -1;
*stop = -1;
}
/* buffers always need syncing and preroll */
return TRUE;