[vlc-commits] fix a few windows warnings (cast to void** aka LPVOID*)

Rafaël Carré git at videolan.org
Mon Nov 14 07:27:24 CET 2011


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Nov 14 01:26:49 2011 -0500| [3f576cd9ec040e1b73ed3569139071666e6b5ff9] | committer: Rafaël Carré

fix a few windows warnings (cast to void** aka LPVOID*)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f576cd9ec040e1b73ed3569139071666e6b5ff9
---

 modules/codec/avcodec/dxva2.c |    2 +-
 modules/codec/dmo/dmo.c       |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 21cbd07..11ad2e7 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -754,7 +754,7 @@ static int DxCreateVideoService(vlc_va_dxva2_t *va)
     IDirectXVideoDecoderService *vs;
     hr = IDirect3DDeviceManager9_GetVideoService(va->devmng, device,
                                                  &IID_IDirectXVideoDecoderService,
-                                                 &vs);
+                                                 (void**)&vs);
     if (FAILED(hr)) {
         msg_Err(va->log, "GetVideoService failed");
         return VLC_EGENERIC;
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index ab3f67d..8880a79 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -788,7 +788,8 @@ loader:
     }
 
     i_err = GetClass( codecs_table[i_codec].p_guid, &IID_IClassFactory,
-                      &cFactory );
+                      (void**)&cFactory );
+
     if( i_err || cFactory == NULL )
     {
         msg_Dbg( p_this, "no such class object" );
@@ -797,7 +798,7 @@ loader:
     }
 
     i_err = cFactory->vt->CreateInstance( cFactory, 0, &IID_IUnknown,
-                                          &cObject );
+                                          (void**)&cObject );
     cFactory->vt->Release( (IUnknown*)cFactory );
     if( i_err || !cObject )
     {
@@ -806,7 +807,7 @@ loader:
         return VLC_EGENERIC;
     }
     i_err = cObject->vt->QueryInterface( cObject, &IID_IMediaObject,
-                                        pp_dmo );
+                                        (void**)pp_dmo );
     cObject->vt->Release( (IUnknown*)cObject );
     if( i_err || !*pp_dmo )
     {
@@ -1209,7 +1210,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
 
         i_err = p_dmo->vt->QueryInterface( (IUnknown *)p_dmo,
                                            &IID_IWMCodecPrivateData,
-                                           &p_privdata );
+                                           (void**)&p_privdata );
         if( i_err ) break;
 
         i_err = p_privdata->vt->SetPartialOutputType( p_privdata, &dmo_type );



More information about the vlc-commits mailing list