mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Slightly deobfuscate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25677 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c706a93140
commit
c9f2fed145
@ -254,11 +254,12 @@ static int init(int rate, int channels, int format, int flags) {
|
||||
if (!port_name)
|
||||
port_flags |= JackPortIsPhysical;
|
||||
matching_ports = jack_get_ports(client, port_name, NULL, port_flags);
|
||||
for (num_ports = 0; matching_ports && matching_ports[num_ports]; num_ports++) ;
|
||||
if (!num_ports) {
|
||||
if (!matching_ports || !matching_ports[0]) {
|
||||
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] no physical ports available\n");
|
||||
goto err_out;
|
||||
}
|
||||
num_ports = 1;
|
||||
while (matching_ports[num_ports]) num_ports++;
|
||||
if (channels > num_ports) channels = num_ports;
|
||||
num_ports = channels;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user