VirtualBox

Changeset 67563 in vbox for trunk/src


Ignore:
Timestamp:
Jun 22, 2017 2:32:07 PM (8 years ago)
Author:
vboxsync
Message:

Audio/PulseAudio: Only copy data if it's not a data hole.

File:
1 edited

Legend:

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

    r67551 r67563  
    818818                  pStreamPA->offPeekBuf, pStreamPA->cbPeekBuf, pStreamPA->pu8PeekBuf));
    819819
    820         if (cbToWrite)
     820        if (   cbToWrite
     821            /* Only copy data if it's not a data hole (see above). */
     822            && pStreamPA->pu8PeekBuf
     823            && pStreamPA->cbPeekBuf)
    821824        {
    822825            memcpy((uint8_t *)pvBuf + cbReadTotal, pStreamPA->pu8PeekBuf + pStreamPA->offPeekBuf, cbToWrite);
     
    11261129    else if (fLog)
    11271130        LogRel(("PulseAudio: Error enumerating PulseAudio server properties\n"));
    1128    
     1131
    11291132    pa_threaded_mainloop_unlock(pThis->pMainLoop);
    11301133
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