From f2fbfeeb9c4ff7aa9ba4b95604ee0fb14ecec763 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 17 May 2023 17:54:09 -0700
Subject: [PATCH] SndfileDecoderPlugin: Fix type mismatch for std::span

Fixes
../git/src/decoder/plugins/SndfileDecoderPlugin.cxx:231:25: error: non-constant-expression cannot be narrowed from type 'sf_count_t' (aka 'long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
                                         std::span{buffer, num_frames * frame_size},
                                                           ^~~~~~~~~~~~~~~~~~~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/decoder/plugins/SndfileDecoderPlugin.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/decoder/plugins/SndfileDecoderPlugin.cxx b/src/decoder/plugins/SndfileDecoderPlugin.cxx
index ad3908847..a3cb87ca9 100644
--- a/src/decoder/plugins/SndfileDecoderPlugin.cxx
+++ b/src/decoder/plugins/SndfileDecoderPlugin.cxx
@@ -228,7 +228,7 @@ sndfile_stream_decode(DecoderClient &client, InputStream &is)
 			break;
 
 		cmd = client.SubmitAudio(is,
-					 std::span{buffer, num_frames * frame_size},
+					 std::span{buffer, static_cast<std::size_t>(num_frames * frame_size)},
 					 0);
 		if (cmd == DecoderCommand::SEEK) {
 			sf_count_t c = client.GetSeekFrame();
