Merge tag 'v0.23.12'

release v0.23.12
This commit is contained in:
Max Kellermann
2023-01-17 18:58:04 +01:00
7 changed files with 25 additions and 23 deletions

View File

@@ -798,6 +798,8 @@ MadDecoder::UpdateTimerNextFrame() noexcept
DecoderCommand
MadDecoder::SubmitPCM(size_t i, size_t pcm_length) noexcept
{
assert(i <= pcm_length);
size_t num_samples = pcm_length - i;
mad_fixed_to_24_buffer(output_buffer, synth.pcm,
@@ -843,7 +845,7 @@ MadDecoder::SynthAndSubmit() noexcept
size_t pcm_length = synth.pcm.length;
if (drop_end_samples &&
current_frame == max_frames - drop_end_frames - 1) {
if (drop_end_samples >= pcm_length)
if (i + drop_end_samples >= pcm_length)
return DecoderCommand::STOP;
pcm_length -= drop_end_samples;

View File

@@ -34,7 +34,6 @@
#include <shlobj.h>
#else
#include <stdlib.h>
#include <unistd.h>
#include <pwd.h>
#endif
@@ -83,16 +82,7 @@ public:
return result != nullptr;
}
bool ReadByUid(uid_t uid) noexcept {
#ifdef HAVE_GETPWUID_R
getpwuid_r(uid, &pw, buf.data(), buf.size(), &result);
#else
result = getpwuid(uid);
#endif
return result != nullptr;
}
const passwd *operator->() noexcept {
const passwd *operator->() {
assert(result != nullptr);
return result;
}
@@ -415,10 +405,8 @@ GetHomeDir() noexcept
#ifndef ANDROID
if (const auto home = GetExistingEnvDirectory("HOME"); home != nullptr)
return AllocatedPath{home};
if (PasswdEntry pw; pw.ReadByUid(getuid()))
return SafePathFromFS(pw->pw_dir);
#endif
return nullptr;
}

View File

@@ -1,4 +1,4 @@
curl_dep = dependency('libcurl', version: '>= 7.33', required: get_option('curl'))
curl_dep = dependency('libcurl', version: '>= 7.55', required: get_option('curl'))
conf.set('ENABLE_CURL', curl_dep.found())
if not curl_dep.found()
subdir_done()

View File

@@ -522,7 +522,13 @@ PipeWireOutput::Open(AudioFormat &audio_format)
pw_properties_setf(props, PW_KEY_REMOTE_NAME, "%s", remote);
if (target != nullptr && target_id == PW_ID_ANY)
pw_properties_setf(props, PW_KEY_NODE_TARGET, "%s", target);
pw_properties_setf(props,
#if PW_CHECK_VERSION(0, 3, 64)
PW_KEY_TARGET_OBJECT,
#else
PW_KEY_NODE_TARGET,
#endif
"%s", target);
#ifdef PW_KEY_NODE_RATE
/* ask PipeWire to change the graph sample rate to ours