diff options
author | Tom Rondeau | 2011-01-04 11:10:27 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-01-04 11:10:27 -0500 |
commit | 99c2b220675f3ca73ef5cf0a9ebe03706f813d61 (patch) | |
tree | c66997cec91dbcb70aa4e16aec4a6b3eb23400ac | |
parent | 6925ccc667c8278c7b250fb4f7225e01680c62ea (diff) | |
download | gnuradio-99c2b220675f3ca73ef5cf0a9ebe03706f813d61.tar.gz gnuradio-99c2b220675f3ca73ef5cf0a9ebe03706f813d61.tar.bz2 gnuradio-99c2b220675f3ca73ef5cf0a9ebe03706f813d61.zip |
Only prune if we've moved on in the number of items read. Fixes the problem or premature pruning.
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_buffer.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.cc b/gnuradio-core/src/lib/runtime/gr_buffer.cc index 3c935b960..624ca78a8 100644 --- a/gnuradio-core/src/lib/runtime/gr_buffer.cc +++ b/gnuradio-core/src/lib/runtime/gr_buffer.cc @@ -163,9 +163,10 @@ gr_buffer::space_available () min_items_read = std::min(min_items_read, d_readers[i]->nitems_read()); } - //prune_tags(min_items_read); - prune_tags(d_last_min_items_read); - d_last_min_items_read = min_items_read; + if(min_items_read != d_last_min_items_read) { + prune_tags(d_last_min_items_read); + d_last_min_items_read = min_items_read; + } // The -1 ensures that the case d_write_index == d_read_index is // unambiguous. It indicates that there is no data for the reader |