From b18533119bfdf12c719eac78390694dfb5733abf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 19 Sep 2023 18:25:31 +0200 Subject: [PATCH] Fix "Branch condition evaluates to a garbage value" in PBD::RingBuffer, vec.buf[1] is not set when vec.len[1] == 0 --- libs/ardour/ffmpegfileimportable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/ffmpegfileimportable.cc b/libs/ardour/ffmpegfileimportable.cc index da7c281abc..6d85304af9 100644 --- a/libs/ardour/ffmpegfileimportable.cc +++ b/libs/ardour/ffmpegfileimportable.cc @@ -236,7 +236,7 @@ FFMPEGFileImportableSource::did_read_data (std::string data, size_t size) samplecnt_t written = 0; for (int i = 0; i < 2; ++i) { samplecnt_t cnt = std::min (n_samples, wv.len[i]); - if (!cnt || !wv.buf[i]) { + if (!cnt) { break; } memcpy (wv.buf[i], cur, cnt * sizeof (float));