On Fri Dec 1 19:49:09 2023 +0000, Rémi Bernon wrote:
I won't be able to confirm either way, only thing I remember is PTSD from deadlocks in the quartz / asf reader / wm reader / winegstreamer stack. Then on the subject of compressed output, I'm not maintaining the WMReader side so I don't want to object to any solution but my opinion is the same as for the MF media source: IMO restarting the wg_parser to make it start / stop decoding isn't the right way. Instead we should wrap lower level unix components, and combine optional WMV / WMA decoders (which I believe should now be more or less working) on the PE side like native does.
Considering the `stream.input_tid = 0; /* FIXME: currently required as Wine calls IStream_Stat synchronously in OpenStream */` in tests/wmvcore.c, I'm inclined to agree that those tests are unnecessary.
That proposal would indeed solve a bunch of todos, but it may also have a performance impact; I don't know how much we copy things around when crossing the PE/Unix boundary.
Switched to making it recreate the thread. I kept the mutex, though; I think those unprotected read_thread_shutdown accesses in current master are harmless in practice, but they make me nervous. (I could've changed the mutex to a few InterlockedOr(), but that'd need a bunch of ugly casts, and it's less clear than a mutex.)