mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 07:49:02 -05:00
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: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
8307f0ab03
commit
3b6813d6f5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user