]> git.sesse.net Git - nageru/commitdiff
Fix another uninitialized sound data issue.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Nov 2015 22:34:24 +0000 (23:34 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Nov 2015 22:34:24 +0000 (23:34 +0100)
mixer.cpp

index f3d975c6d7757a1e049b6eac88377f5362bd34fb..57cd5bdaf2d30daeabc370bffdffaa7703239ef7 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -267,8 +267,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode,
                        // Insert silence as needed.
                        fprintf(stderr, "Card %d dropped %d frame(s) (before timecode 0x%04x), inserting silence.\n",
                                card_index, dropped_frames, timecode);
-                       vector<float> silence;
-                       silence.resize(silence_samples * 2);
+                       vector<float> silence(silence_samples * 2, 0.0f);
                        for (int i = 0; i < dropped_frames; ++i) {
                                card->resampling_queue->add_input_samples(local_pts / double(TIMEBASE), silence.data(), silence_samples);
                                // Note that if the format changed in the meantime, we have