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

Commit 940228fa authored by Praneeth Paladugu's avatar Praneeth Paladugu
Browse files

msm: vidc: Enhance the STOP command for encoder



Currently, STOP command is valid only for decoder. Enhance it
for encoder sessions, so that clients can avoid zero_bytes_used
error for encoders as well.

CRs-Fixed: 2078801
Change-Id: I25148e07ba883a771177864581942fcba0a2b24c
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent aad73aa4
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -3871,18 +3871,13 @@ int msm_vidc_comm_cmd(void *instance, union msm_v4l2_cmd *cmd)
		rc = msm_comm_session_continue(inst);
		rc = msm_comm_session_continue(inst);
		break;
		break;
	}
	}
	/* This case also for V4L2_ENC_CMD_STOP */
	case V4L2_DEC_CMD_STOP:
	case V4L2_DEC_CMD_STOP:
	{
	{
		struct eos_buf *binfo = NULL;
		struct eos_buf *binfo = NULL;
		u32 smem_flags = 0;
		u32 smem_flags = 0;


		get_inst(inst->core, inst);
		get_inst(inst->core, inst);
		if (inst->session_type != MSM_VIDC_DECODER) {
			dprintk(VIDC_DBG,
				"Non-Decoder session. DEC_STOP is not valid\n");
			rc = -EINVAL;
			goto exit;
		}


		binfo = kzalloc(sizeof(*binfo), GFP_KERNEL);
		binfo = kzalloc(sizeof(*binfo), GFP_KERNEL);
		if (!binfo) {
		if (!binfo) {