changeset 177:2258794251be

* fix uninitialised count in summariser
author cannam
date Wed, 06 Aug 2008 14:45:47 +0000
parents adfb6348881c
children a5ede8515893
files vamp-sdk/hostext/PluginSummarisingAdapter.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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<int, OutputAccumulator> 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);