Changeset 74498 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Sep 27, 2018 1:45:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r74058 r74498 2436 2436 AssertPtr(pDrvAudioInst->pReg); 2437 2437 2438 #if 0 /** @todo r=bird: Don't use strlen to check for empty strings. Don't use RTStrPrintf to do RTStrCopy work. */ 2438 2439 char szDriver[64]; 2439 2440 RTStrPrintf(szDriver, RT_ELEMENTS(szDriver), "%s", pDrvAudioInst->pReg->szName); … … 2446 2447 RTStrPrintf(pStream->szName, RT_ELEMENTS(pStream->szName), "[%s] %s", 2447 2448 szDriver, strlen(pCfgHost->szName) ? pCfgHost->szName : "<Untitled>"); 2449 #else 2450 Assert(pDrvAudioInst->pReg->szName[0] != '\0'); 2451 RTStrPrintf(pStream->szName, RT_ELEMENTS(pStream->szName), "[%s] %s", 2452 pDrvAudioInst->pReg->szName[0] != '\0' ? pDrvAudioInst->pReg->szName : "Untitled", 2453 pCfgHost->szName[0] != '\0' ? pCfgHost->szName : "<Untitled>"); 2454 #endif 2448 2455 pStream->enmDir = pCfgHost->enmDir; 2449 2456 … … 3025 3032 return rc; 3026 3033 } 3034 pStream->fValidBackendData = true; 3027 3035 3028 3036 /* Validate acquired configuration. */ … … 3082 3090 /* Check if the pointer to the host audio driver is still valid. 3083 3091 * It can be NULL if we were called in drvAudioDestruct, for example. */ 3084 if (pThis->pHostDrvAudio) 3092 if (pThis->pHostDrvAudio && pStream->fValidBackendData) 3093 { 3085 3094 rc = pThis->pHostDrvAudio->pfnStreamDestroy(pThis->pHostDrvAudio, pStream->pvBackend); 3086 3095 pStream->fValidBackendData = false; 3096 } 3097 3098 /** @todo r=bird: Who frees pvBackend? drvAudioStreamFree, right? 3099 * So, you cannot set to NULL here, can you? */ 3087 3100 pStream->pvBackend = NULL; 3088 3101 pStream->cbBackend = 0;
Note:
See TracChangeset
for help on using the changeset viewer.