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:
Ignacio Casal Quinteiro 2022-04-21 12:47:31 +02:00 committed by GStreamer Marge Bot
parent caa5972abd
commit 408f37c1d9

View file

@ -1240,7 +1240,7 @@ gst_core_audio_select_device_impl (GstCoreAudio * core_audio)
if (ndevices < 1) {
GST_ERROR ("no audio output devices found");
g_free (devices);
goto done;
return res;
}
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)) {
GST_ERROR ("Requested device not usable");
res = FALSE;
goto done;
}
}
if (res)
core_audio->device_id = device_id;
done:
return res;
}