From 8a44a41abb0ce69c8e876d782d8fe661677655a2 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 12 Jul 2023 16:26:17 +0200 Subject: [PATCH] ebur128analysis: Initialize variables to silence warnings --- src/engine/ebur128analysis.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/ebur128analysis.cpp b/src/engine/ebur128analysis.cpp index 527ad2071..7ec40b550 100644 --- a/src/engine/ebur128analysis.cpp +++ b/src/engine/ebur128analysis.cpp @@ -200,7 +200,7 @@ class EBUR128AnalysisImpl { static GstFlowReturn NewBufferCallback(GstAppSink *app_sink, gpointer self); }; -FrameFormat::FrameFormat(GstCaps *caps) { +FrameFormat::FrameFormat(GstCaps *caps) : channels(0), samplerate(0) { GstStructure *structure = gst_caps_get_structure(caps, 0); QString format_str = gst_structure_get_string(structure, "format"); @@ -279,7 +279,7 @@ void EBUR128State::AddFrames(const char *data, size_t size) { Q_ASSERT(size % bytes_per_frame == 0); auto num_frames = size / bytes_per_frame; - int ebur_error; + int ebur_error = 0; switch (dsc.format) { case FrameFormat::DataFormat::S16: ebur_error = ebur128_add_frames_short(&*st, reinterpret_cast(data), num_frames);