Skip to content
Snippets Groups Projects
Commit 00260703 authored by Simon McVittie's avatar Simon McVittie
Browse files

check-va-api: Don't claim to have provided a reference frame


We're decoding a single frame, so there is no previous frame that we
could possibly refer to; and our single frame is an i-frame (keyframe),
so we don't need a reference anyway.

When Mesa is compiled with assertions enabled, if num_ref_frames is
greater than 0, it asserts that ReferenceFrames[0] up to
ReferenceFrames[num_ref_frames-1] inclusive are valid handles to
reference frames. In our case, that array is zero-filled, and 0 clearly
can't be a valid handle to a previous frame because we don't have any
previous frames at all, causing an assertion failure and crash.

Closes: #117
Thanks: David Rosca
Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 6a071283
No related branches found
No related tags found
1 merge request!587check-va-api: Don't claim to have provided a reference frame
Pipeline #59243 passed
...@@ -123,7 +123,7 @@ static VAPictureParameterBufferH264 pic_param_h264 = ...@@ -123,7 +123,7 @@ static VAPictureParameterBufferH264 pic_param_h264 =
/* The size has been arbitrarily chosen */ /* The size has been arbitrarily chosen */
.picture_width_in_mbs_minus1 = 10, .picture_width_in_mbs_minus1 = 10,
.picture_height_in_mbs_minus1 = 10, .picture_height_in_mbs_minus1 = 10,
.num_ref_frames = 1, .num_ref_frames = 0,
}; };
static VAIQMatrixBufferH264 iq_matrix_h264 = static VAIQMatrixBufferH264 iq_matrix_h264 =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment