osxaudio: remove usage of goto
It is easier to follow the code without the goto now Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2251>
This commit is contained in:
parent
caa5972abd
commit
408f37c1d9
@ -1240,7 +1240,7 @@ gst_core_audio_select_device_impl (GstCoreAudio * core_audio)
|
|||||||
if (ndevices < 1) {
|
if (ndevices < 1) {
|
||||||
GST_ERROR ("no audio output devices found");
|
GST_ERROR ("no audio output devices found");
|
||||||
g_free (devices);
|
g_free (devices);
|
||||||
goto done;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG ("found %d audio device(s)", ndevices);
|
GST_DEBUG ("found %d audio device(s)", ndevices);
|
||||||
@ -1283,14 +1283,12 @@ gst_core_audio_select_device_impl (GstCoreAudio * core_audio)
|
|||||||
if (res && !_audio_device_is_alive (device_id, output)) {
|
if (res && !_audio_device_is_alive (device_id, output)) {
|
||||||
GST_ERROR ("Requested device not usable");
|
GST_ERROR ("Requested device not usable");
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
core_audio->device_id = device_id;
|
core_audio->device_id = device_id;
|
||||||
|
|
||||||
done:
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user