mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 09:33:01 +00:00
74cd872091
The StreamMetadataState struct provides us with some useful stream information, but some if it is only available after the initial stream parsing is done. As a consequence, many of its accessor methods return an error if we are in the wrong state. This check is repeated quite a lot in code that uses StreamMetadataState even though a single check should be enough. Replace these accessor methods by a single method returning a reference to the parsed state if it is accessible. This groups redundant runtime checks for the metadata parsing state into a single check and thus reduces the code size a bit. BUG=b:214478588 TEST=cargo test --features vaapi -p cros-codecs Change-Id: I2455ec7901e29f50716d535017f83e4d19b3c6fa Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4164541 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.corp-partner.google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
cros-codecs | ||
ffmpeg | ||
libva | ||
libvda |