summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2010-11-22 22:46:18 -0500
committerTom Rondeau2010-11-22 22:46:18 -0500
commit181ad4cda3879a1760d61054ff32f8abbc9c24cf (patch)
tree043ab2ca534583937d720456f32121d230de129f
parent7c5dc0920240f566ad4482f47ca8b9095479f04e (diff)
downloadgnuradio-181ad4cda3879a1760d61054ff32f8abbc9c24cf.tar.gz
gnuradio-181ad4cda3879a1760d61054ff32f8abbc9c24cf.tar.bz2
gnuradio-181ad4cda3879a1760d61054ff32f8abbc9c24cf.zip
Check for relative rate and update tag only if not 1.0; otherwise just copy.
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block_executor.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
index 59799069a..ea489d079 100644
--- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
@@ -110,15 +110,23 @@ propagate_tags(gr_block::TAG_PROPAGATION_POLICY policy, gr_block_detail *d,
d->nitems_read(i));
std::vector<pmt::pmt_t>::iterator t;
- for(t = rtags.begin(); t != rtags.end(); t++) {
- uint64_t newcount = pmt::pmt_to_uint64(pmt::pmt_tuple_ref(*t, 0));
- pmt::pmt_t newtup = pmt::mp(pmt::pmt_from_uint64(newcount * rrate),
- pmt::pmt_tuple_ref(*t, 1),
- pmt::pmt_tuple_ref(*t, 2),
- pmt::pmt_tuple_ref(*t, 3));
-
- for(int o = 0; o < d->noutputs(); o++)
- d->output(o)->add_item_tag(newtup);
+ if(rrate != 1.0) {
+ for(t = rtags.begin(); t != rtags.end(); t++) {
+ uint64_t newcount = pmt::pmt_to_uint64(pmt::pmt_tuple_ref(*t, 0));
+ pmt::pmt_t newtup = pmt::mp(pmt::pmt_from_uint64(newcount * rrate),
+ pmt::pmt_tuple_ref(*t, 1),
+ pmt::pmt_tuple_ref(*t, 2),
+ pmt::pmt_tuple_ref(*t, 3));
+
+ for(int o = 0; o < d->noutputs(); o++)
+ d->output(o)->add_item_tag(newtup);
+ }
+ }
+ else {
+ for(t = rtags.begin(); t != rtags.end(); t++) {
+ for(int o = 0; o < d->noutputs(); o++)
+ d->output(o)->add_item_tag(*t);
+ }
}
}
break;