summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/flat_flowgraph.cc
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-02-10 07:19:15 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2016-02-10 07:19:15 -0800
commit39968270cf3a9b334008a079a702e567b414dab1 (patch)
treed3febf50607c614f73f0cdbad6b9904fd4f10ca7 /gnuradio-runtime/lib/flat_flowgraph.cc
parent7f07703cf764135cf441d67cec288cf53afa0c9c (diff)
parentc422e26485725abab4224ebe32922bdcd3eda295 (diff)
Merge remote-tracking branch 'tom/set_max_noutput_items'
Diffstat (limited to 'gnuradio-runtime/lib/flat_flowgraph.cc')
-rw-r--r--gnuradio-runtime/lib/flat_flowgraph.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc
index 653cfcc3d6..03e67eb2c2 100644
--- a/gnuradio-runtime/lib/flat_flowgraph.cc
+++ b/gnuradio-runtime/lib/flat_flowgraph.cc
@@ -177,6 +177,13 @@ namespace gr {
catch(std::bad_alloc&) {
b = make_buffer(nitems, item_size, grblock);
}
+
+ // Set the max noutput items size here to make sure it's always
+ // set in the block and available in the start() method.
+ // But don't overwrite if the user has set this externally.
+ if(!grblock->is_set_max_noutput_items())
+ grblock->set_max_noutput_items(nitems);
+
return b;
}