diff --git a/ChangeLog b/ChangeLog index a254f54bba..7afca8fd54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-14 Tim-Philipp Müller + + * 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 * gst/gstpipeline.c: (gst_pipeline_class_init): diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index ae6d2bcb11..9127dbd8aa 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -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;