Native capture APIs can support Dynamic frame rate?

I want to turn the frame rate dynamically and caputre is fixed。so I devided it into caputre and encode two threads,but it works badly。
as follow :Preproc get lock now
RGBToNV12::Convert: Error 0x80070057 in CreateVideoProcessInputView at line 129 in file d:\opensource\nv\nvcapture\video-sdk-samples-master\nvencdxgioutputduplicationsample\preproc.cpp
DDAImpl::GetCapturedFrame: 1 : Accumulated Frames 1 PTS Interval 32818000 PTS 11040326831180
unlock now
DemoApplication::Preproc: Line 303, File d:\opensource\nv\nvcapture\video-sdk-samples-master\nvencdxgioutputduplicationsample\main.cpp Returning error 0x80070057
Preproc failed with error (134.4 KB)

I use CopyResource clone a textrue for annother thread,but it is no use。Who Can help me ?thanks

I change frameDescriptor.MiscFlags = D3D11_RESOURCE_MISC_SHARED at CloneTexture.the 0x80070057 has disappear,but it block at random.
1)block one scene.: RGBToNV12::Convert
PRINTERR(hr, " release VideoProcessorBlt ok");
2)block second scene.:DoEncode
DoEncode start
3)block three scene… GetCapturedFrame at at random
if (FAILED(hr = pResource->QueryInterface(__uuidof(ID3D11Texture2D), (void**)ppTex2D)))
return hr; (134.7 KB)