summaryrefslogtreecommitdiffstats
path: root/ext/esd
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2007-01-04 11:02:29 +0000
committerTim-Philipp Müller <tim@centricular.net>2007-01-04 11:02:29 +0000
commit296b2a6bea4af6d3224a6921e2875e3579f5e61b (patch)
tree4fe16ece548ccdca043a1f328184ad834aa5a7e4 /ext/esd
parent40de57f68f561c14609daff2990565b96de8b883 (diff)
ext/esd/esdsink.c: Don't return bogus values when esd_get_delay() fails for some reason (#392189).
Original commit message from CVS: * ext/esd/esdsink.c: (gst_esdsink_delay): Don't return bogus values when esd_get_delay() fails for some reason (#392189).
Diffstat (limited to 'ext/esd')
-rw-r--r--ext/esd/esdsink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c
index 7fdfafca..3946b301 100644
--- a/ext/esd/esdsink.c
+++ b/ext/esd/esdsink.c
@@ -424,6 +424,11 @@ gst_esdsink_delay (GstAudioSink * asink)
latency = esd_get_latency (esdsink->ctrl_fd);
+ if (latency == (guint) - 1) {
+ GST_WARNING_OBJECT (asink, "couldn't get latency");
+ return 0;
+ }
+
/* latency is measured in samples at a rate of 44100, this
* cannot overflow. */
latency = latency * G_GINT64_CONSTANT (44100) / esdsink->rate;