media: libva: take ownership of SegmentParamVP9 in the wrapper

It's not ergonomic for the calling code to pass in an array of
references.

Just take ownership of that array, as it's not going to be used again
when the calling code succeeds in creating the wrapper.

BUG=b:214478588
TEST="cargo build --features=video-decoder,vaapi" successfully builds
the libva crate

Change-Id: I97d91f9f996c298450e65c21c126a9739ec4615f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3900314
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
Daniel Almeida 2022-09-14 15:47:53 -03:00 committed by crosvm LUCI
parent 71873e46a5
commit 5ede18b6f7

View file

@ -714,7 +714,7 @@ impl SliceParameterBufferVP9 {
slice_data_size: u32,
slice_data_offset: u32,
slice_data_flag: u32,
seg_param: [&SegmentParameterVP9; 8usize],
seg_param: [SegmentParameterVP9; 8usize],
) -> Self {
let seg_param = seg_param.map(|param| param.0);