From: Santino Mazza smazza@codeweavers.com
--- dlls/evr/presenter.c | 12 +++--------- dlls/evr/sample.c | 1 + 2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index f9e372d0ed1..ae7563231be 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -55,7 +55,6 @@ enum streaming_thread_message { EVRM_STOP = WM_USER, EVRM_PRESENT = WM_USER + 1, - EVRM_PROCESS_INPUT = WM_USER + 2, };
struct sample_queue @@ -705,11 +704,6 @@ static DWORD CALLBACK video_presenter_streaming_thread(void *arg) } break;
- case EVRM_PROCESS_INPUT: - EnterCriticalSection(&presenter->cs); - video_presenter_process_input(presenter); - LeaveCriticalSection(&presenter->cs); - break; default: ; } @@ -1810,9 +1804,9 @@ static HRESULT WINAPI video_presenter_allocator_cb_NotifyRelease(IMFVideoSampleA { struct video_presenter *presenter = impl_from_IMFVideoSampleAllocatorNotify(iface);
- /* Release notification is executed under allocator lock, instead of processing samples here - notify streaming thread. */ - PostThreadMessageW(presenter->thread.tid, EVRM_PROCESS_INPUT, 0, 0); + EnterCriticalSection(&presenter->cs); + video_presenter_process_input(presenter); + LeaveCriticalSection(&presenter->cs);
return S_OK; } diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 36f15a0c48f..0a7300429d0 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -837,6 +837,7 @@ static HRESULT WINAPI sample_allocator_tracking_callback_Invoke(IMFAsyncCallback
IMFSample_Release(sample); callback = allocator->callback; + if (callback && allocator->lock_notify_release) { IMFVideoSampleAllocatorNotify_NotifyRelease(callback);