diff options
author | Tom Rondeau | 2010-11-22 22:46:18 -0500 |
---|---|---|
committer | Tom Rondeau | 2010-11-22 22:46:18 -0500 |
commit | 181ad4cda3879a1760d61054ff32f8abbc9c24cf (patch) | |
tree | 043ab2ca534583937d720456f32121d230de129f | |
parent | 7c5dc0920240f566ad4482f47ca8b9095479f04e (diff) | |
download | gnuradio-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.cc | 26 |
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; |