On Wed Apr 3 23:41:35 2024 +0000, Brendan McGrath wrote:
To add a bit more detail about the issue, the two main causes for the 40ms wait appear to be:
- The decoding that takes place in the Theora decoder; and
- The memcpy that takes place in wg_parser_stream_copy_buffer
I've tried a hack to remove the memcpy, but it's unfortunately not enough; and the decoding is obviously unavoidable. So the only fix appears to be to have the video and audio happen in parallel (not sequentially). Obviously having the video decode happen in a separate MFT (in its own thread) would do the job, but do you think there's a place for this MR in the interim? Or do you think the additional concurrency it introduces is too great a risk?
We're having a lot of problems already with concurrency in the media source, with a lot of people hitting deadlocks, and more generally because it doesn't behave like on Windows, so IMO this MR isn't the right fix.