shizhenghui commented on code in PR #11936: URL: https://github.com/apache/nuttx/pull/11936#discussion_r1529591089
########## drivers/video/v4l2_core.c: ########## @@ -447,7 +445,51 @@ static int v4l2_ioctl(FAR struct file *filep, return v4l2->vops->enum_frmsize(v4l2, (FAR struct v4l2_frmsizeenum *)arg); - break; + + case VIDIOC_CROPCAP: + if (v4l2->vops->cropcap == NULL) + { + break; + } + + return v4l2->vops->cropcap(v4l2, + (FAR struct v4l2_cropcap *)arg); + + case VIDIOC_DQEVENT: + if (v4l2->vops->dqevent == NULL) + { + break; + } + + return v4l2->vops->dqevent(v4l2, + (FAR struct v4l2_event *)arg); + + case VIDIOC_SUBSCRIBE_EVENT: + if (v4l2->vops->subscribe_event == NULL) + { + break; + } + + return v4l2->vops->subscribe_event(v4l2, + (FAR struct v4l2_event_subscription *)arg); + + case VIDIOC_DECODER_CMD: + if (v4l2->vops->decoder_cmd == NULL) + { + break; + } + + return v4l2->vops->decoder_cmd(v4l2, + (FAR struct v4l2_decoder_cmd *)arg); + + case VIDIOC_ENCODER_CMD: + if (v4l2->vops->encoder_cmd == NULL) + { + break; + } Review Comment: @acassis Here, the code follows the previous code. If the function pointer is NULL, the switch section will exit and return `- ENOTTY`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org