This is presumably a bug inÂ Windows Media Video 9 EncoderÂ in versions up to Windows 7 included (fixed in Windows 8.1 at the very least – wmvencod.dll 6.3.9600.17415).
IMediaObject::DiscontinuityÂ call destroys input the DMO it already holds: it reports success, and handles discontinuity correctly. It even drains output as it should, but if in the same time it already has input to process – this input is gone and the typical outcome is that a frame (or possibly more?) in the end of the stream is trimmed away.
The call itself is legal and reportsÂ
S_OK. The method should have returnedÂ
DMO_E_NOTACCEPTINGÂ if it is too early to report discontinuity, and the DMO does not do it.
Good news it’s fixed in its most recent version and it is not a cold case.