On Fri May 30 19:56:12 2025 +0000, Nikolay Sivov wrote:
I don't think this test belongs to mf.dll. Streams are accessed from sources, and of course there is no guarantee what source would do, since you can have custom components. It what way does it depend on reading in specific chunks?
Where should the test be instead? I added it here since it's very similar to the existing ones. FYI The main work is done by test_byte_stream, the additional test is basically just for verifying that the behavior applies to a big file (bigger than the chunk size constant), too.
The game I'm dealing with uses CBC encryption for a video file, and creates a new decryption context for each byte stream read. If reads are misaligned or too large, some blocks will get XORed with the initialization vector instead of the previous block, or vice versa.
This is obviously very messy on the game's side. Maybe this patch should just be on proton instead, I don't know - but the behavior is consistent on windows, so I thought upstream could benefit from it.