On 9/8/22 01:56, RĂ©mi Bernon wrote:
@@ -191,13 +191,12 @@ static DWORD WINAPI async_reader_callback_thread(void *arg) struct async_op *op = LIST_ENTRY(entry, struct async_op, entry); list_remove(&op->entry);
if (op->new_context)
reader->context = op->new_context; hr = list_empty(&reader->async_ops) ? S_OK : E_ABORT; switch (op->type) { case ASYNC_OP_START: {
reader->context = op->data; LeaveCriticalSection(&reader->callback_cs); IWMReaderCallback_OnStatus(reader->callback, WMT_STARTED, hr, WMT_TYPE_DWORD, (BYTE *)&zero, reader->context);
Note that this is a change in behaviour; now if someone calls IWMReader::Start() with a NULL context that'll override the previous one. That's what I would expect, but it'd be nice to have a test. It'd also be nice to avoid including functional changes in patches whose subject line describes just a refactoring.