summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authoreb2009-03-19 17:27:47 +0000
committereb2009-03-19 17:27:47 +0000
commitf430647f21ae456591e2f8152e6234cf8752f245 (patch)
tree8581c7985e65d084a4d64239d40fe615f5964374 /gnuradio-core
parenta280d36680d1f1b2f3cbe565b4db0765025e675a (diff)
downloadgnuradio-f430647f21ae456591e2f8152e6234cf8752f245.tar.gz
gnuradio-f430647f21ae456591e2f8152e6234cf8752f245.tar.bz2
gnuradio-f430647f21ae456591e2f8152e6234cf8752f245.zip
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
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/general/gr_clock_recovery_mm_ff.cc5
1 files changed, 3 insertions, 2 deletions
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;
}