From 5ede18b6f757ac10959ed1791959ae4526775641 Mon Sep 17 00:00:00 2001 From: Daniel Almeida Date: Wed, 14 Sep 2022 15:47:53 -0300 Subject: [PATCH] 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 Reviewed-by: Alexandre Courbot Reviewed-by: Keiichi Watanabe --- media/libva/src/buffer_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libva/src/buffer_type.rs b/media/libva/src/buffer_type.rs index a1bc983741..c39d332f92 100644 --- a/media/libva/src/buffer_type.rs +++ b/media/libva/src/buffer_type.rs @@ -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);