Commit 86557b9e authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

strmbase: Fallback to InitializeCriticalSection() if…

strmbase: Fallback to InitializeCriticalSection() if RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO is unsupported.
parent 525ef1bf
...@@ -524,10 +524,12 @@ void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, ...@@ -524,10 +524,12 @@ void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer,
filter->outer_unk = outer ? outer : &filter->IUnknown_inner; filter->outer_unk = outer ? outer : &filter->IUnknown_inner;
filter->refcount = 1; filter->refcount = 1;
InitializeCriticalSectionEx(&filter->filter_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); if (!InitializeCriticalSectionEx(&filter->filter_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))
InitializeCriticalSection(&filter->filter_cs);
if (filter->filter_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1) if (filter->filter_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
filter->filter_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.filter_cs"); filter->filter_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.filter_cs");
InitializeCriticalSectionEx(&filter->stream_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); if (!InitializeCriticalSectionEx(&filter->stream_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))
InitializeCriticalSection(&filter->stream_cs);
if (filter->stream_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1) if (filter->stream_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
filter->stream_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.stream_cs"); filter->stream_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.stream_cs");
filter->clsid = *clsid; filter->clsid = *clsid;
......
...@@ -730,7 +730,8 @@ void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknow ...@@ -730,7 +730,8 @@ void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknow
passthrough->IMediaPosition_iface.lpVtbl = &IMediaPositionPassThru_Vtbl; passthrough->IMediaPosition_iface.lpVtbl = &IMediaPositionPassThru_Vtbl;
passthrough->IMediaSeeking_iface.lpVtbl = &IMediaSeekingPassThru_Vtbl; passthrough->IMediaSeeking_iface.lpVtbl = &IMediaSeekingPassThru_Vtbl;
passthrough->ISeekingPassThru_iface.lpVtbl = &ISeekingPassThru_Vtbl; passthrough->ISeekingPassThru_iface.lpVtbl = &ISeekingPassThru_Vtbl;
InitializeCriticalSectionEx(&passthrough->time_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); if (!InitializeCriticalSectionEx(&passthrough->time_cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))
InitializeCriticalSection(&passthrough->time_cs);
passthrough->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_passthrough.time_cs" ); passthrough->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_passthrough.time_cs" );
} }
......
...@@ -49,7 +49,8 @@ HRESULT strmbase_seeking_init(SourceSeeking *pSeeking, const IMediaSeekingVtbl * ...@@ -49,7 +49,8 @@ HRESULT strmbase_seeking_init(SourceSeeking *pSeeking, const IMediaSeekingVtbl *
pSeeking->llDuration = pSeeking->llStop; pSeeking->llDuration = pSeeking->llStop;
pSeeking->dRate = 1.0; pSeeking->dRate = 1.0;
pSeeking->timeformat = TIME_FORMAT_MEDIA_TIME; pSeeking->timeformat = TIME_FORMAT_MEDIA_TIME;
InitializeCriticalSectionEx(&pSeeking->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); if (!InitializeCriticalSectionEx(&pSeeking->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO))
InitializeCriticalSection(&pSeeking->cs);
pSeeking->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SourceSeeking.cs"); pSeeking->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SourceSeeking.cs");
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment