From: <sl...@ke...> - 2010-10-03 21:49:51
|
Module: gst-plugins-good Branch: master Commit: c1877deee0b5c1175769351d3872f22d937cf88b URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=c1877deee0b5c1175769351d3872f22d937cf88b Author: Sebastian Dröge <seb...@co...> Date: Sun Oct 3 23:49:08 2010 +0200 rtpg722pay: Fix uninitialized variable compiler warning The clock rate is always 8000 Hz according to the RFC and the sampling rate must always be 16000 Hz. --- gst/rtp/gstrtpg722pay.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtpg722pay.c b/gst/rtp/gstrtpg722pay.c index 9788fa5..56c4a9f 100644 --- a/gst/rtp/gstrtpg722pay.c +++ b/gst/rtp/gstrtpg722pay.c @@ -131,8 +131,9 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) else order = NULL; - if (rate == 16000) - clock_rate = 8000; + /* Clock rate is always 8000 Hz for G722 according to + * RFC 3551 although the sampling rate is 16000 Hz */ + clock_rate = 8000; gst_basertppayload_set_options (basepayload, "audio", TRUE, "G722", clock_rate); |