mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-11 01:10:32 +00:00
Fix --no-audio
By default, the audio source is initialized to SC_AUDIO_SOURCE_AUTO, and
is "resolved" only if audio is enabled.
But the server arguments were built assuming that the audio source was
never SC_AUDIO_SOURCE_AUTO (even with audio disabled), causing a crash.
Regression introduced by a10f8cd798
.
This commit is contained in:
parent
ed4066902d
commit
071d459ad7
@ -288,7 +288,9 @@ execute_server(struct sc_server *server,
|
||||
assert(params->video_source == SC_VIDEO_SOURCE_CAMERA);
|
||||
ADD_PARAM("video_source=camera");
|
||||
}
|
||||
if (params->audio_source != SC_AUDIO_SOURCE_OUTPUT) {
|
||||
// If audio is enabled, an "auto" audio source must have been resolved
|
||||
assert(params->audio_source != SC_AUDIO_SOURCE_AUTO || !params->audio);
|
||||
if (params->audio_source != SC_AUDIO_SOURCE_OUTPUT && params->audio) {
|
||||
ADD_PARAM("audio_source=%s",
|
||||
sc_server_get_audio_source_name(params->audio_source));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user