summaryrefslogtreecommitdiff
path: root/gsm-tvoid/src/lib/gsm_burst_cf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gsm-tvoid/src/lib/gsm_burst_cf.cc')
-rwxr-xr-xgsm-tvoid/src/lib/gsm_burst_cf.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gsm-tvoid/src/lib/gsm_burst_cf.cc b/gsm-tvoid/src/lib/gsm_burst_cf.cc
index df182a6..e9fe0fc 100755
--- a/gsm-tvoid/src/lib/gsm_burst_cf.cc
+++ b/gsm-tvoid/src/lib/gsm_burst_cf.cc
@@ -96,14 +96,14 @@ int gsm_burst_cf::general_work (int noutput_items,
if (get_burst()) {
//found a burst, send to output
- //ensure that output data is in range
- int b = d_burst_start;
- if (b < 0)
- b = 0;
- else if (b >= 2 * MAX_CORR_DIST)
- b = 2 * MAX_CORR_DIST - 1;
-
if (out) {
+ //ensure that output data is in range
+ int b = d_burst_start;
+ if (b < 0)
+ b = 0;
+ else if (b >= 2 * MAX_CORR_DIST)
+ b = 2 * MAX_CORR_DIST - 1;
+
memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float));
rval++;
}
personal git repositories of Harald Welte. Your mileage may vary