basesrc: Set format to TIME if do-timestamp is TRUE
authorOlivier Crête <olivier.crete@collabora.com>
Wed, 3 Jul 2013 00:27:59 +0000 (20:27 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Thu, 5 Dec 2013 18:29:05 +0000 (13:29 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=702842

libs/gst/base/gstbasesrc.c

index d5bad3d..5653967 100644 (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);
 }