From: Anton Baskanov baskanov@gmail.com
--- dlls/quartz/avidec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 8cc729748c1..f020d618fdb 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -552,7 +552,7 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
filter->late = -1;
- source_format = (VIDEOINFOHEADER *)filter->sink.pin.mt.pbFormat; + source_format = (VIDEOINFOHEADER *)filter->source.pin.mt.pbFormat; if ((res = ICDecompressBegin(filter->hvid, filter->pBihIn, &source_format->bmiHeader))) { ERR("ICDecompressBegin() failed, error %Id.\n", res);
From: Anton Baskanov baskanov@gmail.com
--- dlls/quartz/avidec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index f020d618fdb..d7f97e0380c 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -361,8 +361,8 @@ static HRESULT avi_decompressor_source_get_media_type(struct strmbase_pin *iface format->bmiHeader.biPlanes = sink_format->bmiHeader.biPlanes; format->bmiHeader.biBitCount = formats[index].bpp; format->bmiHeader.biCompression = formats[index].compression; - format->bmiHeader.biSizeImage = format->bmiHeader.biWidth - * format->bmiHeader.biHeight * formats[index].bpp / 8; + format->bmiHeader.biSizeImage = format->bmiHeader.biHeight * (((format->bmiHeader.biWidth + * formats[index].bpp + 31) / 8) & ~3);
if (IsEqualGUID(formats[index].subtype, &MEDIASUBTYPE_RGB565)) {
From: Anton Baskanov baskanov@gmail.com
Otherwise, the streaming thread might try to access the decompressor while it's being destroyed. --- dlls/quartz/avidec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index d7f97e0380c..4f1eca4f90a 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -573,10 +573,16 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface) if (!filter->source.pin.peer) return S_OK;
- if (filter->hvid && (res = ICDecompressEnd(filter->hvid))) + if (filter->hvid) + { + EnterCriticalSection(&filter->filter.stream_cs); + res = ICDecompressEnd(filter->hvid); + LeaveCriticalSection(&filter->filter.stream_cs); + if (res) { ERR("ICDecompressEnd() failed, error %Id.\n", res); return E_FAIL; + } }
IMemAllocator_Decommit(filter->source.pAllocator);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145645
Your paranoid android.
=== debian11 (32 bit report) ===
quartz: avidec.c:122: Test succeeded inside todo block: Output types didn't match. avidec.c:122: Test succeeded inside todo block: Output types didn't match. avidec.c:122: Test succeeded inside todo block: Output types didn't match.
=== debian11b (64 bit WoW report) ===
quartz: avidec.c:122: Test succeeded inside todo block: Output types didn't match. avidec.c:122: Test succeeded inside todo block: Output types didn't match. avidec.c:122: Test succeeded inside todo block: Output types didn't match.