Commit 3b6813d6 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: vicodec: stateless codecs do not have EOS and SOURCE_CHANGE events

Return an error when attempting to subscribe to those events
for a stateless codec.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 8307f0ab
......@@ -1293,6 +1293,8 @@ static int vicodec_subscribe_event(struct v4l2_fh *fh,
return -EINVAL;
/* fall through */
case V4L2_EVENT_EOS:
if (ctx->is_stateless)
return -EINVAL;
return v4l2_event_subscribe(fh, sub, 0, NULL);
default:
return v4l2_ctrl_subscribe_event(fh, sub);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment