Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index f8d90a5c0df..bf968fe2129 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -111,6 +111,8 @@ static void sample_grabber_destroy(struct strmbase_filter *iface) SG_Impl *filter = impl_from_strmbase_filter(iface);
SampleGrabber_cleanup(filter); + strmbase_sink_cleanup(&filter->sink); + strmbase_source_cleanup(&filter->source); strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); }
Fixes a regression introduced by 2c8e152ff06ae3e460276401b4b6bdaa1ffc676d.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index bf968fe2129..63b48533be6 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -41,7 +41,6 @@ typedef struct _SG_Impl { struct strmbase_source source; /* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */ IUnknown *seekthru_unk; - IMemInputPin *memOutput;
struct strmbase_sink sink; AM_MEDIA_TYPE mtype; @@ -85,8 +84,6 @@ static void SampleGrabber_cleanup(SG_Impl *This) WARN("(%p) still joined to filter graph %p\n", This, This->filter.filterInfo.pGraph); if (This->allocator) IMemAllocator_Release(This->allocator); - if (This->memOutput) - IMemInputPin_Release(This->memOutput); if (This->grabberIface) ISampleGrabberCB_Release(This->grabberIface); CoTaskMemFree(This->mtype.pbFormat); @@ -398,7 +395,7 @@ SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCAT FIXME("(%p)->(%p): semi-stub\n", This, props); if (!props) return E_POINTER; - return This->memOutput ? IMemInputPin_GetAllocatorRequirements(This->memOutput, props) : E_NOTIMPL; + return This->source.pMemInputPin ? IMemInputPin_GetAllocatorRequirements(This->source.pMemInputPin, props) : E_NOTIMPL; }
/* IMemInputPin */ @@ -407,13 +404,13 @@ SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) { SG_Impl *This = impl_from_IMemInputPin(iface); HRESULT hr; - TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->memOutput, This->grabberIface); + TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->source.pMemInputPin, This->grabberIface); if (!sample) return E_POINTER; if (This->oneShot == OneShot_Past) return S_FALSE; SampleGrabber_callback(This, sample); - hr = This->memOutput ? IMemInputPin_Receive(This->memOutput, sample) : S_OK; + hr = This->source.pMemInputPin ? IMemInputPin_Receive(This->source.pMemInputPin, sample) : S_OK; if (This->oneShot == OneShot_Wait) { This->oneShot = OneShot_Past; hr = S_FALSE; @@ -429,14 +426,14 @@ SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **s { SG_Impl *This = impl_from_IMemInputPin(iface); LONG idx; - TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->memOutput, This->grabberIface); + TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->source.pMemInputPin, This->grabberIface); if (!samples || !nProcessed) return E_POINTER; if ((This->filter.state != State_Running) || (This->oneShot == OneShot_Past)) return S_FALSE; for (idx = 0; idx < nSamples; idx++) SampleGrabber_callback(This, samples[idx]); - return This->memOutput ? IMemInputPin_ReceiveMultiple(This->memOutput, samples, nSamples, nProcessed) : S_OK; + return This->source.pMemInputPin ? IMemInputPin_ReceiveMultiple(This->source.pMemInputPin, samples, nSamples, nProcessed) : S_OK; }
/* IMemInputPin */ @@ -445,7 +442,7 @@ SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface) { SG_Impl *This = impl_from_IMemInputPin(iface); TRACE("(%p)\n", This); - return This->memOutput ? IMemInputPin_ReceiveCanBlock(This->memOutput) : S_OK; + return This->source.pMemInputPin ? IMemInputPin_ReceiveCanBlock(This->source.pMemInputPin) : S_OK; }
/* IPin - input pin */ @@ -686,7 +683,6 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out) obj->mtype.subtype = MEDIASUBTYPE_None; obj->mtype.formattype = FORMAT_None; obj->allocator = NULL; - obj->memOutput = NULL; obj->grabberIface = NULL; obj->grabberMethod = -1; obj->oneShot = OneShot_None;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=62199
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:445 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:445 Task: Patch failed to apply
Fixes a regression introduced by 2c8e152ff06ae3e460276401b4b6bdaa1ffc676d.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 63b48533be6..b9c07ca8f2f 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -629,7 +629,7 @@ static HRESULT WINAPI sample_grabber_source_AttemptConnection(struct strmbase_so return VFW_E_TYPE_NOT_ACCEPTED; if (!IsEqualGUID(&mt->formattype, &FORMAT_None) && !IsEqualGUID(&mt->formattype, &GUID_NULL) - && !IsEqualGUID(&mt->formattype, &filter->mtype.majortype)) + && !IsEqualGUID(&mt->formattype, &filter->mtype.formattype)) return VFW_E_TYPE_NOT_ACCEPTED; if (!IsEqualGUID(&mt->formattype, &FORMAT_None) && !IsEqualGUID(&mt->formattype, &GUID_NULL)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=62200
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:445 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/qedit/samplegrabber.c:445 Task: Patch failed to apply