Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 894d3e29 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Allow V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD only for H264 codec"

parents 29ef159c b2a4c541
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1664,6 +1664,15 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)

	switch (ctrl->id) {
	case V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD:
		if (inst->fmts[CAPTURE_PORT]->fourcc != V4L2_PIX_FMT_H264 &&
			inst->fmts[CAPTURE_PORT]->fourcc !=
				V4L2_PIX_FMT_H264_NO_SC) {
			dprintk(VIDC_ERR, "Control 0x%x only valid for H264\n",
					ctrl->id);
			rc = -ENOTSUPP;
			break;
		}

		property_id =
			HAL_CONFIG_VENC_IDR_PERIOD;
		idr_period.idr_period = ctrl->val;