In case RGB32 format is passed as input to MSDK Encoder Filter (e.g. Cam Capture -> MJPEG Decompressor -> Intel Encoder ) there is a color space conversion plugin inserted before encoder to convert to NV12. This plugin doesnt pass-through the timestamp of the input surface therefore the correct timestamp never reaches encoder input and doesnt appear on encoded bitstream to be transformed into output MediaSample start and end times (see CEncVideoFilter::DeliverBitstream function).
The fix is very simple:
In file samples\sample_dshow_plugins\common\src\plugin_csc.cpp, line 129 add the following line of code:
surface_out->Data.TimeStamp = surface_in->Data.TimeStamp;