VirtualBox

Changeset 85570 in vbox


Ignore:
Timestamp:
Jul 30, 2020 8:26:54 PM (4 years ago)
Author:
vboxsync
Message:

DrvHostPulseAudio.cpp: put the mainloop creatation outside the silly while-not-a-goto loop. bugref:8666

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp

    r85531 r85570  
    676676
    677677    pThis->fAbortLoop = false;
    678     pThis->pMainLoop = NULL;
     678    pThis->pMainLoop = pa_threaded_mainloop_new();
     679    if (!pThis->pMainLoop)
     680    {
     681        LogRel(("PulseAudio: Failed to allocate main loop: %s\n", pa_strerror(pa_context_errno(pThis->pContext))));
     682        return VERR_NO_MEMORY;
     683    }
    679684
    680685    bool fLocked = false;
     
    682687    do
    683688    {
    684         if (!(pThis->pMainLoop = pa_threaded_mainloop_new()))
    685         {
    686             LogRel(("PulseAudio: Failed to allocate main loop: %s\n",
    687                      pa_strerror(pa_context_errno(pThis->pContext))));
    688             rc = VERR_NO_MEMORY;
    689             break;
    690         }
    691 
    692689        if (!(pThis->pContext = pa_context_new(pa_threaded_mainloop_get_api(pThis->pMainLoop), "VirtualBox")))
    693690        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette