From 98472a81047c0280c760291f6839cff9bb0743b6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 23 Dec 2017 08:38:22 +0100 Subject: [PATCH 1/2] pcm/SampleFormat: remove wrong "malloc" attribute --- src/pcm/SampleFormat.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx index 9d956b7f9..bd82acef6 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_pure const char * sample_format_to_string(SampleFormat format) noexcept; From eee10ad2ed14bac7675147bac79c3ba9a2b6d582 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Dec 2017 20:00:18 +0100 Subject: [PATCH 2/2] input/curl: add missing mutex locks to OnEnd(), OnError() --- src/input/plugins/CurlInputPlugin.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index 5cc29a539..7547b97f4 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -266,6 +266,7 @@ CurlInputStream::OnData(ConstBuffer data) void CurlInputStream::OnEnd() { + const std::lock_guard protect(mutex); cond.broadcast(); AsyncInputStream::SetClosed(); @@ -274,6 +275,7 @@ CurlInputStream::OnEnd() void CurlInputStream::OnError(std::exception_ptr e) { + const std::lock_guard protect(mutex); postponed_exception = std::move(e); if (IsSeekPending())