webrtcechoprobe: return from _read() early if the probe is not configured yet
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Mon, 27 Mar 2017 15:14:54 +0000 (18:14 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 29 Mar 2017 13:45:12 +0000 (16:45 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=780642

ext/webrtcdsp/gstwebrtcechoprobe.cpp

index 5b811b6..a34fa52 100644 (file)
@@ -277,7 +277,8 @@ gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self, GstClockTime rec_time,
 
   GST_WEBRTC_ECHO_PROBE_LOCK (self);
 
-  if (!GST_CLOCK_TIME_IS_VALID (self->latency))
+  if (!GST_CLOCK_TIME_IS_VALID (self->latency) ||
+      !GST_AUDIO_INFO_IS_VALID (&self->info))
     goto done;
 
   /* In delay agnostic mode, just return 10ms of data */