On 2/9/22 10:56, Giovanni Mascellani wrote:
Hi,
Il 09/02/22 07:27, Nikolay Sivov ha scritto:
I think this will benefit from some locking, protecting source state.
My understanding is that access to the media source state is (mostly) already serialized by the fact that the commands queue only allows one job at a time. It doesn't mean that there are no bug (as my patch exposes), but first you should identify the issues that need to be addressed, I think.
I mean access to state fields, like "state" or "eos". That's easy to see for shutdown state checks. Async commands are serialized, in a sense, but it's questionable functionality too. For example queuing 3 sample requests, and then stopping will have to process these 3 requests first, and then stop command. While in fact it might as well drop pending requests and transition right when Stop() is called.
Giovanni.