# HG changeset patch # User cannam # Date 1218033947 0 # Node ID 2258794251bebdad9c507bf6b08dac15439588fb # Parent adfb6348881c6a4f768254c48e39a908b85c26cf * fix uninitialised count in summariser diff -r adfb6348881c -r 2258794251be vamp-sdk/hostext/PluginSummarisingAdapter.cpp --- a/vamp-sdk/hostext/PluginSummarisingAdapter.cpp Tue Aug 05 15:36:40 2008 +0000 +++ b/vamp-sdk/hostext/PluginSummarisingAdapter.cpp Wed Aug 06 14:45:47 2008 +0000 @@ -68,6 +68,7 @@ struct OutputAccumulator { int count; BinValueMap values; + OutputAccumulator() : count(0), values() { } }; typedef std::map OutputAccumulatorMap; @@ -171,10 +172,12 @@ FeatureList fl; for (SummarySegmentMap::const_iterator i = m_summaries[output].begin(); i != m_summaries[output].end(); ++i) { + Feature f; f.hasTimestamp = true; f.timestamp = i->first; f.hasDuration = false; + for (OutputSummary::const_iterator j = i->second.begin(); j != i->second.end(); ++j) { @@ -225,6 +228,8 @@ result = summary.count; break; } + + f.values.push_back(result); } fl.push_back(f);