changeset 24405:3758413ca0c6

Fix for: dshow/DS_Filter.c: In function 'DS_Filter_CopySample': dshow/DS_Filter.c:103: warning: dereferencing type-punned pointer will break strict-aliasing rules dshow/DS_Filter.c:185: warning: dereferencing type-punned pointer will break strict-aliasing rules dshow/DS_Filter.c:191: warning: dereferencing type-punned pointer will break strict-aliasing rules dshow/DS_Filter.c:198: warning: dereferencing type-punned pointer will break strict-aliasing rules dshow/DS_Filter.c:220: warning: dereferencing type-punned pointer will break strict-aliasing rules dshow/DS_Filter.c:245: warning: dereferencing type-punned pointer will break strict-aliasing rules dmo/dmo.c: In function 'DMO_FilterCreate': dmo/dmo.c:73: warning: dereferencing type-punned pointer will break strict-aliasing rules dmo/dmo.c:79: warning: dereferencing type-punned pointer will break strict-aliasing rules dmo/dmo.c:86: warning: dereferencing type-punned pointer will break strict-aliasing rules dmo/dmo.c:90: warning: dereferencing type-punned pointer will break strict-aliasing rules dmo/dmo.c:93: warning: dereferencing type-punned pointer will break strict-aliasing rules
author voroshil
date Mon, 10 Sep 2007 18:27:45 +0000
parents 67e6bb7dcac4
children a422b6c96368
files loader/dmo/dmo.c loader/dshow/DS_Filter.c
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dmo/dmo.c	Mon Sep 10 18:07:25 2007 +0000
+++ b/loader/dmo/dmo.c	Mon Sep 10 18:27:45 2007 +0000
@@ -70,27 +70,27 @@
 	    break;
 	}
 //trapbug();
-	hr = func(id, &IID_IClassFactory, (void**)&factory);
+	hr = func(id, &IID_IClassFactory, (void*)&factory);
 	if (hr || !factory)
 	{
 	    em = "no such class object";
 	    break;
 	}
-	hr = factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void**)&object);
+	hr = factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void*)&object);
 	factory->vt->Release((IUnknown*)factory);
 	if (hr || !object)
 	{
 	    em = "class factory failure";
 	    break;
 	}
-	hr = object->vt->QueryInterface(object, &IID_IMediaObject, (void**)&This->m_pMedia);
+	hr = object->vt->QueryInterface(object, &IID_IMediaObject, (void*)&This->m_pMedia);
 	if (hr == 0)
 	{
             /* query for some extra available interface */
-	    HRESULT r = object->vt->QueryInterface(object, &IID_IMediaObjectInPlace, (void**)&This->m_pInPlace);
+	    HRESULT r = object->vt->QueryInterface(object, &IID_IMediaObjectInPlace, (void*)&This->m_pInPlace);
             if (r == 0 && This->m_pInPlace)
 		printf("DMO dll supports InPlace - PLEASE REPORT to developer\n");
-	    r = object->vt->QueryInterface(object, &IID_IDMOVideoOutputOptimizations, (void**)&This->m_pOptim);
+	    r = object->vt->QueryInterface(object, &IID_IDMOVideoOutputOptimizations, (void*)&This->m_pOptim);
 	    if (r == 0 && This->m_pOptim)
 	    {
                 unsigned long flags;
--- a/loader/dshow/DS_Filter.c	Mon Sep 10 18:07:25 2007 +0000
+++ b/loader/dshow/DS_Filter.c	Mon Sep 10 18:27:45 2007 +0000
@@ -96,7 +96,7 @@
 }
 
 static HRESULT STDCALL DS_Filter_CopySample(void* pUserData,IMediaSample* pSample){
-    char* pointer;
+    BYTE* pointer;
     int len;
     SampleProcUserData* pData=(SampleProcUserData*)pUserData;
     Debug printf("CopySample called(%p,%p)\n",pSample,pUserData);
@@ -182,20 +182,20 @@
 	    em = "illegal or corrupt DirectShow DLL";
 	    break;
 	}
-	result = func(id, &IID_IClassFactory, (void**)&factory);
+	result = func(id, &IID_IClassFactory, (void*)&factory);
 	if (result || !factory)
 	{
 	    em = "no such class object";
 	    break;
 	}
-	result = factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void**)&object);
+	result = factory->vt->CreateInstance(factory, 0, &IID_IUnknown, (void*)&object);
 	factory->vt->Release((IUnknown*)factory);
 	if (result || !object)
 	{
 	    em = "class factory failure";
 	    break;
 	}
-	result = object->vt->QueryInterface(object, &IID_IBaseFilter, (void**)&This->m_pFilter);
+	result = object->vt->QueryInterface(object, &IID_IBaseFilter, (void*)&This->m_pFilter);
 	object->vt->Release((IUnknown*)object);
 	if (result || !This->m_pFilter)
 	{
@@ -216,14 +216,14 @@
 
 	for (i = 0; i < fetched; i++)
 	{
-	    int direction = -1;
+	    PIN_DIRECTION direction = -1;
 	    array[i]->vt->QueryDirection(array[i], (PIN_DIRECTION*)&direction);
-	    if (!This->m_pInputPin && direction == 0)
+	    if (!This->m_pInputPin && direction == PINDIR_INPUT)
 	    {
 		This->m_pInputPin = array[i];
 		This->m_pInputPin->vt->AddRef((IUnknown*)This->m_pInputPin);
 	    }
-	    if (!This->m_pOutputPin && direction == 1)
+	    if (!This->m_pOutputPin && direction == PINDIR_OUTPUT)
 	    {
 		This->m_pOutputPin = array[i];
 		This->m_pOutputPin->vt->AddRef((IUnknown*)This->m_pOutputPin);
@@ -242,7 +242,7 @@
 	}
 	result = This->m_pInputPin->vt->QueryInterface((IUnknown*)This->m_pInputPin,
 						       &IID_IMemInputPin,
-						       (void**)&This->m_pImp);
+						       (void*)&This->m_pImp);
 	if (result)
 	{
 	    em = "could not get IMemInputPin interface";