1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-02 13:02:24 +00:00
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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24425 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
voroshil 2007-09-10 18:27:45 +00:00
parent 169a837b18
commit 903cbd2fc7
2 changed files with 13 additions and 13 deletions

View File

@ -70,27 +70,27 @@ DMO_Filter* DMO_FilterCreate(const char* dllname, const GUID* id,
break; break;
} }
//trapbug(); //trapbug();
hr = func(id, &IID_IClassFactory, (void**)&factory); hr = func(id, &IID_IClassFactory, (void*)&factory);
if (hr || !factory) if (hr || !factory)
{ {
em = "no such class object"; em = "no such class object";
break; 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); factory->vt->Release((IUnknown*)factory);
if (hr || !object) if (hr || !object)
{ {
em = "class factory failure"; em = "class factory failure";
break; 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) if (hr == 0)
{ {
/* query for some extra available interface */ /* 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) if (r == 0 && This->m_pInPlace)
printf("DMO dll supports InPlace - PLEASE REPORT to developer\n"); 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) if (r == 0 && This->m_pOptim)
{ {
unsigned long flags; unsigned long flags;

View File

@ -96,7 +96,7 @@ void DS_Filter_Destroy(DS_Filter* This)
} }
static HRESULT STDCALL DS_Filter_CopySample(void* pUserData,IMediaSample* pSample){ static HRESULT STDCALL DS_Filter_CopySample(void* pUserData,IMediaSample* pSample){
char* pointer; BYTE* pointer;
int len; int len;
SampleProcUserData* pData=(SampleProcUserData*)pUserData; SampleProcUserData* pData=(SampleProcUserData*)pUserData;
Debug printf("CopySample called(%p,%p)\n",pSample,pUserData); Debug printf("CopySample called(%p,%p)\n",pSample,pUserData);
@ -182,20 +182,20 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
em = "illegal or corrupt DirectShow DLL"; em = "illegal or corrupt DirectShow DLL";
break; break;
} }
result = func(id, &IID_IClassFactory, (void**)&factory); result = func(id, &IID_IClassFactory, (void*)&factory);
if (result || !factory) if (result || !factory)
{ {
em = "no such class object"; em = "no such class object";
break; 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); factory->vt->Release((IUnknown*)factory);
if (result || !object) if (result || !object)
{ {
em = "class factory failure"; em = "class factory failure";
break; 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); object->vt->Release((IUnknown*)object);
if (result || !This->m_pFilter) if (result || !This->m_pFilter)
{ {
@ -216,14 +216,14 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
for (i = 0; i < fetched; i++) for (i = 0; i < fetched; i++)
{ {
int direction = -1; PIN_DIRECTION direction = -1;
array[i]->vt->QueryDirection(array[i], (PIN_DIRECTION*)&direction); 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 = array[i];
This->m_pInputPin->vt->AddRef((IUnknown*)This->m_pInputPin); 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 = array[i];
This->m_pOutputPin->vt->AddRef((IUnknown*)This->m_pOutputPin); This->m_pOutputPin->vt->AddRef((IUnknown*)This->m_pOutputPin);
@ -242,7 +242,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id,
} }
result = This->m_pInputPin->vt->QueryInterface((IUnknown*)This->m_pInputPin, result = This->m_pInputPin->vt->QueryInterface((IUnknown*)This->m_pInputPin,
&IID_IMemInputPin, &IID_IMemInputPin,
(void**)&This->m_pImp); (void*)&This->m_pImp);
if (result) if (result)
{ {
em = "could not get IMemInputPin interface"; em = "could not get IMemInputPin interface";