basesrc: Set format to TIME if do-timestamp is TRUE

https://bugzilla.gnome.org/show_bug.cgi?id=702842
This commit is contained in:
Olivier Crête 2013-07-02 20:27:59 -04:00
parent 208e303568
commit 68697682ce

View file

@ -763,6 +763,8 @@ gst_base_src_set_do_timestamp (GstBaseSrc * src, gboolean timestamp)
GST_OBJECT_LOCK (src);
src->priv->do_timestamp = timestamp;
if (timestamp && src->segment.format != GST_FORMAT_TIME)
gst_segment_init (&src->segment, GST_FORMAT_TIME);
GST_OBJECT_UNLOCK (src);
}