mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
vidc: Correct start and stop sequence.
Video core stop should be called only if start is successful. Change-Id: Ie2a8d970355387ee3fcdc34b62184972e89dd6cc Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
This commit is contained in:
parent
f0adb8bf52
commit
eb9863d4c8
1 changed files with 3 additions and 2 deletions
|
@ -577,6 +577,7 @@ static int vid_enc_open_client(struct video_client_ctx **vid_clnt_ctx,
|
|||
rc = vcd_open(vid_enc_device_p->device_handle, false,
|
||||
vid_enc_vcd_cb, client_ctx, flags);
|
||||
client_ctx->stop_msg = 0;
|
||||
client_ctx->stop_called = 1;
|
||||
|
||||
if (!rc) {
|
||||
wait_for_completion(&client_ctx->event);
|
||||
|
@ -662,7 +663,6 @@ static int vid_enc_open_secure(struct inode *inode, struct file *file)
|
|||
return rc;
|
||||
|
||||
close_client:
|
||||
client_ctx->stop_called = 1;
|
||||
vid_enc_close_client(client_ctx);
|
||||
ERR("Secure session operation failure\n");
|
||||
error:
|
||||
|
@ -1018,7 +1018,8 @@ static long vid_enc_ioctl(struct file *file,
|
|||
if (!result) {
|
||||
ERR("setting VEN_IOCTL_CMD_START failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
} else
|
||||
client_ctx->stop_called = 0;
|
||||
break;
|
||||
}
|
||||
case VEN_IOCTL_CMD_STOP:
|
||||
|
|
Loading…
Reference in a new issue