On Tue Nov 15 20:30:58 2022 +0000, Zebediah Figura wrote:
> Similarly to the earlier question about IWMSyncReader locking, do we
> need to drop the CS here?
Because this is a blocking call, which can call application callbacks, or otherwise also blocking until there's a sample ready.
We want to be able to deliver samples from the callback thread, on other streams, without being blocked and without blocking the reader. There's no point in making all this asynchronous otherwise.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15902
On Tue Nov 15 20:30:59 2022 +0000, Zebediah Figura wrote:
> Missed this the first time, but: I'd make this an ERR, personally. (An
> application can trigger it, but it's one of those cases where it's a
> sign that something went catastrophically wrong, and also we're pretty
> much guessing how to handle it if not.)
The most common case where this happens is on EOS, I don't think we want to print error. When streams are deselected this would happen as well if it interrupts the wait on buffer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15903
On Tue Nov 15 20:30:59 2022 +0000, Zebediah Figura wrote:
> What's the point of this? We never check the return code of
> async_reader_get_next_sample(), only whether it FAILED().
No, it's checked outside of the loop to see if all streams have received EOS (in which case `hr == NS_E_NO_MORE_SAMPLES`), or if there's still some streams with pending requests or pending samples to deliver (`hr == E_PENDING`).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1311#note_15904