MFVEA PopulateInputSampleBuffer: uninitialised buffer tail handed to vendor MFT

Target: Windows GPU process, media/gpu/windows/media_foundation_video_encode_accelerator_win.cc:2061-2116.

This page drives a hardware VideoEncoder at an even, non-macroblock-aligned resolution (1922×1082) using CPU-backed I420 frames. In the GPU process this enters PopulateInputSampleBuffer(), which:

  1. allocates an uninitialised MFCreateAlignedMemoryBuffer sized to MFT_INPUT_STREAM_INFO.cbSize (vendor-reported minimum),
  2. calls SetCurrentLength(cbSize) before writing,
  3. writes only AllocationSize(NV12, 1922×1082) = 3,119,406 bytes via ConvertAndScale(),
  4. returns early on the default path (kMediaFoundationD3DVideoProcessing is FEATURE_DISABLED_BY_DEFAULT), passing the under-written buffer with current_length = cbSize > bytes_written straight to the vendor MFT's ProcessInput().

If the MFT reports cbSize > AllocationSize (e.g. 16-row macroblock padding to 1088 ⇒ ≥ 3,136,704 bytes), the trailing ~17 KB of each frame is uninitialised GPU-process heap that the encoder may incorporate into the H.264 bitstream's padded / cropped-out macroblock rows. A fresh buffer is allocated per frame, so iterating samples many distinct heap regions.