What does HRESULT 0xC00D36E0 (MF_E_SAMPLE_NOT_WRITABLE) mean?

 
Previous Next
MF_E_SAMPLE_HAS_TOO_MANY_BUFFERS MF_E_INVALID_KEY

MF_E_SAMPLE_NOT_WRITABLE

MF_E_SAMPLE_NOT_WRITABLE indicates a mutability mismatch. The component is trying to modify sample data or sample layout, but the supplied sample does not provide storage that can be written in the required way.

Distinguish sample ownership from buffer access

  • Identify the exact operation that needs write access: modifying bytes, changing current length, replacing buffers, or writing a transform result.
  • For CPU-accessible buffers, check the IMFMediaBuffer::Lock result and update the current data length after writing.
  • For 2-D or GPU-backed video buffers, prefer IMF2DBuffer2::Lock2DSize with the minimum required lock flags. A Direct3D surface might not be lockable through the generic path.

If the producer owns a read-only or otherwise non-writable sample, allocate a destination sample/buffer that satisfies the consumer's contract and copy only when required. Repeatedly calling Lock does not change the underlying resource's capabilities, and locking is not a thread-synchronization mechanism.

Microsoft: IMFMediaBuffer::Lock · Microsoft: IMF2DBuffer2::Lock2DSize · Wine: sample and buffer interfaces


Looking for a different code? Search another status or error code.