diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index bb264381d..c6a62d286 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -270,6 +270,7 @@ CurlInputStream::OnData(ConstBuffer data) void CurlInputStream::OnEnd() { + const std::lock_guard protect(mutex); cond.broadcast(); AsyncInputStream::SetClosed(); @@ -278,6 +279,7 @@ CurlInputStream::OnEnd() void CurlInputStream::OnError(std::exception_ptr e) noexcept { + const std::lock_guard protect(mutex); postponed_exception = std::move(e); if (IsSeekPending()) diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx index badfe1781..408357825 100644 --- a/src/pcm/SampleFormat.hxx +++ b/src/pcm/SampleFormat.hxx @@ -122,7 +122,7 @@ sample_format_size(SampleFormat format) * @param format a #SampleFormat enum value * @return the string */ -gcc_pure gcc_malloc gcc_returns_nonnull +gcc_pure gcc_returns_nonnull const char * sample_format_to_string(SampleFormat format) noexcept;