commit | 087bc489935dcf6d7f3b0e0ffac7f437f3fb55d6 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Tue Mar 28 23:21:31 2023 +0900 |
committer | Alexandre Courbot <acourbot@chromium.org> | Fri Mar 31 12:57:26 2023 +0900 |
tree | 11f2e836fd6642fdbfffc255c469158c752a69ae | |
parent | 9b5c01658795ed9c42eebd4da86f51fec5cd756a [diff] |
decoders: fix display order of frames in non-blocking mode Making the tests check the order of frames revealed that frames were sometimes presented out-of-order when decoding in non-blocking mode, i.e. when there can be more than one frame in the ready_queue of the decoder. The cause is that we test all the frames in the queue for readiness, and return all those that pass the test. This leaves space for a race condition where frame X is not ready at the time of testing, and frame X + 1 becomes ready by the time it is tested. When this happens, frame X + 1 is returned before frame X. Fix this by stopping filtering on the first frame that signals it is not ready. Since the decoder processes the jobs we give it in-order, this guarantees that the frames will always be returned in the correct order.
A lightweight, simple, low-dependencies, and hopefully safe crate for using hardware-accelerated decoding and encoding on Linux.
It is developed for use in ChromeOS (particularly crosvm), but has no ChromeOS dependencies and should this be usable anywhere.
This crate is still under heavy development. Currently implemented features are:
Future features: