summaryrefslogtreecommitdiff
path: root/libavdevice/dshow_pin.c
diff options
context:
space:
mode:
authorDiederick Niehorster <dcnieho@gmail.com>2022-01-02 10:49:38 +0100
committerGyan Doshi <ffmpeg@gyani.pro>2022-01-04 17:40:54 +0530
commit76e164f3326c3c2330f3fdd22716ca2495e7c612 (patch)
tree1b4fe26e9de61d7b4144c3219c137e2aaaf6ecc9 /libavdevice/dshow_pin.c
parent307d2b867f35cb18f9ff6085f7e5298c3f0be278 (diff)
avdevice/dshow: fix crash on x86
fix regression introduced in 911ba8417e8881a7380842e69e11ca05fdc46575. Removal of WINAPI decoration from function signatures caused crashed when using dshow on x86. Fixes #9568 Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Diffstat (limited to 'libavdevice/dshow_pin.c')
-rw-r--r--libavdevice/dshow_pin.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 2d1fa0e882..f846b68918 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -29,13 +29,13 @@ DECLARE_QUERYINTERFACE(pin, DShowPin,
DECLARE_ADDREF(pin, DShowPin)
DECLARE_RELEASE(pin, DShowPin)
-long ff_dshow_pin_Connect(DShowPin *this, IPin *pin, const AM_MEDIA_TYPE *type)
+long WINAPI ff_dshow_pin_Connect(DShowPin *this, IPin *pin, const AM_MEDIA_TYPE *type)
{
dshowdebug("ff_dshow_pin_Connect(%p, %p, %p)\n", this, pin, type);
/* Input pins receive connections. */
return S_FALSE;
}
-long ff_dshow_pin_ReceiveConnection(DShowPin *this, IPin *pin,
+long WINAPI ff_dshow_pin_ReceiveConnection(DShowPin *this, IPin *pin,
const AM_MEDIA_TYPE *type)
{
enum dshowDeviceType devtype = this->filter->type;
@@ -62,7 +62,7 @@ long ff_dshow_pin_ReceiveConnection(DShowPin *this, IPin *pin,
return S_OK;
}
-long ff_dshow_pin_Disconnect(DShowPin *this)
+long WINAPI ff_dshow_pin_Disconnect(DShowPin *this)
{
dshowdebug("ff_dshow_pin_Disconnect(%p)\n", this);
@@ -75,7 +75,7 @@ long ff_dshow_pin_Disconnect(DShowPin *this)
return S_OK;
}
-long ff_dshow_pin_ConnectedTo(DShowPin *this, IPin **pin)
+long WINAPI ff_dshow_pin_ConnectedTo(DShowPin *this, IPin **pin)
{
dshowdebug("ff_dshow_pin_ConnectedTo(%p)\n", this);
@@ -88,7 +88,7 @@ long ff_dshow_pin_ConnectedTo(DShowPin *this, IPin **pin)
return S_OK;
}
-long ff_dshow_pin_ConnectionMediaType(DShowPin *this, AM_MEDIA_TYPE *type)
+long WINAPI ff_dshow_pin_ConnectionMediaType(DShowPin *this, AM_MEDIA_TYPE *type)
{
dshowdebug("ff_dshow_pin_ConnectionMediaType(%p)\n", this);
@@ -99,7 +99,7 @@ long ff_dshow_pin_ConnectionMediaType(DShowPin *this, AM_MEDIA_TYPE *type)
return ff_copy_dshow_media_type(type, &this->type);
}
-long ff_dshow_pin_QueryPinInfo(DShowPin *this, PIN_INFO *info)
+long WINAPI ff_dshow_pin_QueryPinInfo(DShowPin *this, PIN_INFO *info)
{
dshowdebug("ff_dshow_pin_QueryPinInfo(%p)\n", this);
@@ -115,7 +115,7 @@ long ff_dshow_pin_QueryPinInfo(DShowPin *this, PIN_INFO *info)
return S_OK;
}
-long ff_dshow_pin_QueryDirection(DShowPin *this, PIN_DIRECTION *dir)
+long WINAPI ff_dshow_pin_QueryDirection(DShowPin *this, PIN_DIRECTION *dir)
{
dshowdebug("ff_dshow_pin_QueryDirection(%p)\n", this);
if (!dir)
@@ -123,7 +123,7 @@ long ff_dshow_pin_QueryDirection(DShowPin *this, PIN_DIRECTION *dir)
*dir = PINDIR_INPUT;
return S_OK;
}
-long ff_dshow_pin_QueryId(DShowPin *this, wchar_t **id)
+long WINAPI ff_dshow_pin_QueryId(DShowPin *this, wchar_t **id)
{
dshowdebug("ff_dshow_pin_QueryId(%p)\n", this);
@@ -134,12 +134,12 @@ long ff_dshow_pin_QueryId(DShowPin *this, wchar_t **id)
return S_OK;
}
-long ff_dshow_pin_QueryAccept(DShowPin *this, const AM_MEDIA_TYPE *type)
+long WINAPI ff_dshow_pin_QueryAccept(DShowPin *this, const AM_MEDIA_TYPE *type)
{
dshowdebug("ff_dshow_pin_QueryAccept(%p)\n", this);
return S_FALSE;
}
-long ff_dshow_pin_EnumMediaTypes(DShowPin *this, IEnumMediaTypes **enumtypes)
+long WINAPI ff_dshow_pin_EnumMediaTypes(DShowPin *this, IEnumMediaTypes **enumtypes)
{
const AM_MEDIA_TYPE *type = NULL;
DShowEnumMediaTypes *new;
@@ -154,31 +154,31 @@ long ff_dshow_pin_EnumMediaTypes(DShowPin *this, IEnumMediaTypes **enumtypes)
*enumtypes = (IEnumMediaTypes *) new;
return S_OK;
}
-long ff_dshow_pin_QueryInternalConnections(DShowPin *this, IPin **pin,
+long WINAPI ff_dshow_pin_QueryInternalConnections(DShowPin *this, IPin **pin,
unsigned long *npin)
{
dshowdebug("ff_dshow_pin_QueryInternalConnections(%p)\n", this);
return E_NOTIMPL;
}
-long ff_dshow_pin_EndOfStream(DShowPin *this)
+long WINAPI ff_dshow_pin_EndOfStream(DShowPin *this)
{
dshowdebug("ff_dshow_pin_EndOfStream(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_BeginFlush(DShowPin *this)
+long WINAPI ff_dshow_pin_BeginFlush(DShowPin *this)
{
dshowdebug("ff_dshow_pin_BeginFlush(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_EndFlush(DShowPin *this)
+long WINAPI ff_dshow_pin_EndFlush(DShowPin *this)
{
dshowdebug("ff_dshow_pin_EndFlush(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_NewSegment(DShowPin *this, REFERENCE_TIME start, REFERENCE_TIME stop,
+long WINAPI ff_dshow_pin_NewSegment(DShowPin *this, REFERENCE_TIME start, REFERENCE_TIME stop,
double rate)
{
dshowdebug("ff_dshow_pin_NewSegment(%p)\n", this);
@@ -250,43 +250,43 @@ DECLARE_DESTROY(pin, DShowPin, ff_dshow_pin_Free)
/*****************************************************************************
* DShowMemInputPin
****************************************************************************/
-long ff_dshow_meminputpin_QueryInterface(DShowMemInputPin *this, const GUID *riid,
+long WINAPI ff_dshow_meminputpin_QueryInterface(DShowMemInputPin *this, const GUID *riid,
void **ppvObject)
{
DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
dshowdebug("ff_dshow_meminputpin_QueryInterface(%p)\n", this);
return ff_dshow_pin_QueryInterface(pin, riid, ppvObject);
}
-unsigned long ff_dshow_meminputpin_AddRef(DShowMemInputPin *this)
+unsigned long WINAPI ff_dshow_meminputpin_AddRef(DShowMemInputPin *this)
{
DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
dshowdebug("ff_dshow_meminputpin_AddRef(%p)\n", this);
return ff_dshow_pin_AddRef(pin);
}
-unsigned long ff_dshow_meminputpin_Release(DShowMemInputPin *this)
+unsigned long WINAPI ff_dshow_meminputpin_Release(DShowMemInputPin *this)
{
DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
dshowdebug("ff_dshow_meminputpin_Release(%p)\n", this);
return ff_dshow_pin_Release(pin);
}
-long ff_dshow_meminputpin_GetAllocator(DShowMemInputPin *this, IMemAllocator **alloc)
+long WINAPI ff_dshow_meminputpin_GetAllocator(DShowMemInputPin *this, IMemAllocator **alloc)
{
dshowdebug("ff_dshow_meminputpin_GetAllocator(%p)\n", this);
return VFW_E_NO_ALLOCATOR;
}
-long ff_dshow_meminputpin_NotifyAllocator(DShowMemInputPin *this, IMemAllocator *alloc,
+long WINAPI ff_dshow_meminputpin_NotifyAllocator(DShowMemInputPin *this, IMemAllocator *alloc,
BOOL rdwr)
{
dshowdebug("ff_dshow_meminputpin_NotifyAllocator(%p)\n", this);
return S_OK;
}
-long ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *this,
+long WINAPI ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *this,
ALLOCATOR_PROPERTIES *props)
{
dshowdebug("ff_dshow_meminputpin_GetAllocatorRequirements(%p)\n", this);
return E_NOTIMPL;
}
-long ff_dshow_meminputpin_Receive(DShowMemInputPin *this, IMediaSample *sample)
+long WINAPI ff_dshow_meminputpin_Receive(DShowMemInputPin *this, IMediaSample *sample)
{
DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
enum dshowDeviceType devtype = pin->filter->type;
@@ -354,7 +354,7 @@ long ff_dshow_meminputpin_Receive(DShowMemInputPin *this, IMediaSample *sample)
return S_OK;
}
-long ff_dshow_meminputpin_ReceiveMultiple(DShowMemInputPin *this,
+long WINAPI ff_dshow_meminputpin_ReceiveMultiple(DShowMemInputPin *this,
IMediaSample **samples, long n, long *nproc)
{
int i;
@@ -366,7 +366,7 @@ long ff_dshow_meminputpin_ReceiveMultiple(DShowMemInputPin *this,
*nproc = n;
return S_OK;
}
-long ff_dshow_meminputpin_ReceiveCanBlock(DShowMemInputPin *this)
+long WINAPI ff_dshow_meminputpin_ReceiveCanBlock(DShowMemInputPin *this)
{
dshowdebug("ff_dshow_meminputpin_ReceiveCanBlock(%p)\n", this);
/* I swear I will not block. */