audiobasesrc: Post latency message on the bus after set_caps()
authorSebastian Dröge <sebastian@centricular.com>
Tue, 1 Dec 2015 17:57:10 +0000 (19:57 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 1 Dec 2015 17:58:25 +0000 (19:58 +0200)
The latency is only known once the caps are known, and might change
whenever the caps are changing.

https://bugzilla.gnome.org/show_bug.cgi?id=758911

gst-libs/gst/audio/gstaudiobasesrc.c

index b529b76e0a2ac3ed858472ee6d3d5598020b23b0..1f0dc76a09ecb2978eb5ddb6b5e8dadc661276bf 100644 (file)
@@ -583,6 +583,9 @@ gst_audio_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
   g_object_notify (G_OBJECT (src), "actual-buffer-time");
   g_object_notify (G_OBJECT (src), "actual-latency-time");
 
+  gst_element_post_message (GST_ELEMENT_CAST (bsrc),
+      gst_message_new_latency (GST_OBJECT (bsrc)));
+
   return TRUE;
 
   /* ERRORS */