mirror of
https://github.com/mpv-player/mpv
synced 2025-02-07 07:31:48 +00:00
Simplify argument "parsing"
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24948 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a44c9616a8
commit
f4f7560a1e
@ -126,11 +126,9 @@ static int init(int rate_hz, int channels, int format, int flags) {
|
||||
char *sink = NULL;
|
||||
|
||||
if (ao_subdevice) {
|
||||
int i = strcspn(ao_subdevice, ":");
|
||||
host = strdup(ao_subdevice);
|
||||
if (host[i] == ':')
|
||||
sink = &host[i + 1];
|
||||
host[i] = 0;
|
||||
sink = strchr(host, ':');
|
||||
if (sink) *sink++ = 0;
|
||||
}
|
||||
|
||||
ss.channels = channels;
|
||||
|
Loading…
Reference in New Issue
Block a user