diff --git a/src/context.c b/src/context.c index c05caf2..705c742 100644 --- a/src/context.c +++ b/src/context.c @@ -270,6 +270,14 @@ VAStatus RequestCreateContext(VADriverContextP context, VAConfigID config_id, (picture_height + 15) / 16 - 1; dummy_sps.profile_idc = 100; /* High */ dummy_sps.level_idc = 41; + /* + * FRAME_MBS_ONLY required: rkvdec_h264_validate_sps + * doubles height for non-frame-mbs-only streams to + * compute frame-height from field-height. Without + * this flag, dummy with (height_in_map_units+1)*16 + * = 1088 doubles to 2176 > coded_fmt 1080 → -EINVAL. + */ + dummy_sps.flags = V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY; dummy_ctrl.id = V4L2_CID_STATELESS_H264_SPS; dummy_ctrl.ptr = &dummy_sps;