summaryrefslogtreecommitdiff
path: root/v4l2-mfc-example/mfc.c
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-mfc-example/mfc.c')
-rw-r--r--v4l2-mfc-example/mfc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/v4l2-mfc-example/mfc.c b/v4l2-mfc-example/mfc.c
index 1b535e6..0a89657 100644
--- a/v4l2-mfc-example/mfc.c
+++ b/v4l2-mfc-example/mfc.c
@@ -367,3 +367,17 @@ int mfc_dec_setup_capture(struct instance *i, int extra_buf)
return 0;
}
+int mfc_dec_stop(struct instance *i)
+{
+ int ret;
+ struct v4l2_decoder_cmd cmd;
+
+ memzero(cmd);
+ cmd.cmd = V4L2_ENC_CMD_STOP;
+ ret = ioctl(i->mfc.fd, VIDIOC_DECODER_CMD, &cmd);
+ if (ret != 0) {
+ err("Failed ioctl vidioc_decoder_cmd");
+ return -1;
+ }
+ return 0;
+}