VirtualBox

Changeset 68882 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Sep 26, 2017 6:13:13 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118144
Message:

DrvAudioVideoRec.cpp: reverse order, drop unnecessary assertions, PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns) always comes first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp

    r68850 r68882  
    10191019
    10201020/**
     1021 * @interface_method_impl{PDMDRVREG,pfnDestruct}
     1022 */
     1023/* static */
     1024DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)
     1025{
     1026    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
     1027    PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
     1028    LogFlowFuncEnter();
     1029
     1030    /*
     1031     * If the AudioVideoRec object is still alive, we must clear it's reference to
     1032     * us since we'll be invalid when we return from this method.
     1033     */
     1034    if (pThis->pAudioVideoRec)
     1035    {
     1036        pThis->pAudioVideoRec->mpDrv = NULL;
     1037        pThis->pAudioVideoRec = NULL;
     1038    }
     1039}
     1040
     1041
     1042/**
    10211043 * Construct a audio video recording driver instance.
    10221044 *
     
    10261048DECLCALLBACK(int) AudioVideoRec::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    10271049{
    1028     RT_NOREF(fFlags);
    1029 
    1030     AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
    1031     AssertPtrReturn(pCfg,    VERR_INVALID_POINTER);
    1032 
    10331050    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    10341051    PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
     1052    RT_NOREF(fFlags);
    10351053
    10361054    LogRel(("Audio: Initializing video recording audio driver\n"));
     
    10851103
    10861104    return VINF_SUCCESS;
    1087 }
    1088 
    1089 
    1090 /**
    1091  * @interface_method_impl{PDMDRVREG,pfnDestruct}
    1092  */
    1093 /* static */
    1094 DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)
    1095 {
    1096     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    1097     PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
    1098     LogFlowFuncEnter();
    1099 
    1100     /*
    1101      * If the AudioVideoRec object is still alive, we must clear it's reference to
    1102      * us since we'll be invalid when we return from this method.
    1103      */
    1104     if (pThis->pAudioVideoRec)
    1105     {
    1106         pThis->pAudioVideoRec->mpDrv = NULL;
    1107         pThis->pAudioVideoRec = NULL;
    1108     }
    11091105}
    11101106
Note: See TracChangeset for help on using the changeset viewer.

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