sets mfx.FrameInfo.CropH/W but then calling
resets .CropH/W (0). The tutorial simple_transocde.cpp sets the encoder's FrameInfo .CropW.H from the decoders. It works in the tutorial because .Query is not used (it's commented out most places I've seen).
The question is, why does DecodeHeader() set .CropW/H when Query() turns around and resets it?
As you point out, it is not required to call Query. You can also opt to provide a different data storage for the output of Query so that the input does not get modified.
We will look into the behavior for setting CropW/H values in the Query call. We may be able to improve this behavior in the next release of Media SDK.