From f430647f21ae456591e2f8152e6234cf8752f245 Mon Sep 17 00:00:00 2001 From: eb Date: Thu, 19 Mar 2009 17:27:47 +0000 Subject: Fix for ticket:375, gr_clock_recovery_mm_ff, from Mike Ossmann. Thanks! git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10646 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnuradio-core/src/lib/general') diff --git a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc index fdf82667a..2e9eea8e6 100644 --- a/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc +++ b/gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc @@ -108,9 +108,10 @@ gr_clock_recovery_mm_ff::general_work (int noutput_items, int ii = 0; // input index int oo = 0; // output index + int ni = ninput_items[0] - d_interp->ntaps(); // don't use more input than this float mm_val; - while (oo < noutput_items){ + while (oo < noutput_items && ii < ni ){ // produce output sample out[oo] = d_interp->interpolate (&in[ii], d_mu); @@ -132,5 +133,5 @@ gr_clock_recovery_mm_ff::general_work (int noutput_items, consume_each (ii); - return noutput_items; + return oo; } -- cgit