LibMedia: Ensure that buffers passed to SubsampledYUVFrame are moved

This commit is contained in:
Zaggy1024 2024-06-18 22:58:02 -05:00 committed by Andrew Kaster
commit 6f8389c483
Notes: sideshowbarker 2024-07-17 03:10:07 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ ErrorOr<NonnullOwnPtr<SubsampledYUVFrame>> SubsampledYUVFrame::try_create(
auto plane_y_array = TRY(FixedArray<u16>::create(plane_y));
auto plane_u_array = TRY(FixedArray<u16>::create(plane_u));
auto plane_v_array = TRY(FixedArray<u16>::create(plane_v));
return adopt_nonnull_own_or_enomem(new (nothrow) SubsampledYUVFrame(size, bit_depth, cicp, subsampling_horizontal, subsampling_vertical, plane_y_array, plane_u_array, plane_v_array));
return adopt_nonnull_own_or_enomem(new (nothrow) SubsampledYUVFrame(size, bit_depth, cicp, subsampling_horizontal, subsampling_vertical, move(plane_y_array), move(plane_u_array), move(plane_v_array)));
}
template<u32 subsampling_horizontal>