speex: fix latency query

Speex should report 30 ms latency for narrowband mode, 34 otherwise.
  Fixes #619018
This commit is contained in:
Tristan Matthews 2010-05-18 15:27:06 -04:00 committed by Sebastian Dröge
parent 9c59da8601
commit 6628d20eac

View file

@ -410,7 +410,11 @@ gst_speex_enc_convert_sink (GstPad * pad, GstFormat src_format,
static gint64
gst_speex_enc_get_latency (GstSpeexEnc * enc)
{
return 30 * GST_MSECOND;
/* See the Speex manual section "Latency and algorithmic delay" */
if (enc->rate == 8000)
return 30 * GST_MSECOND;
else
return 34 * GST_MSECOND;
}
static const GstQueryType *