On 3/6/19 10:13 PM, Dafna Hirschfeld wrote:
> Implement a stateless decoder for the new node.
>
> Signed-off-by: Dafna Hirschfeld <[email protected]>
> ---
<snip>
> +static int vicodec_try_ctrl(struct v4l2_ctrl *ctrl)
> +{
> + struct vicodec_ctx *ctx = container_of(ctrl->handler,
> + struct vicodec_ctx, hdl);
> + const struct v4l2_ctrl_fwht_params *params;
> + struct vicodec_q_data *q_dst = get_q_data(ctx,
> + V4L2_BUF_TYPE_VIDEO_CAPTURE);
> +
> + switch (ctrl->id) {
> + case V4L2_CID_MPEG_VIDEO_FWHT_PARAMS:
> + if (!q_dst->info)
> + return -EINVAL;
> + params = ctrl->p_new.p_fwht_params;
> + if (params->width > q_dst->coded_width ||
> + params->width < MIN_WIDTH ||
> + params->height > q_dst->coded_height ||
> + params->height < MIN_HEIGHT)
> + return -EINVAL;
> + if (!validate_by_version(params->flags, params->version))
> + return -EINVAL;
> + if (!validate_stateless_params_flags(params, q_dst->info))
> + return -EINVAL;
There should be a return 0; statement here rather than fall through.
I'll make this trivial change when I prepare the pull request for this
patch series, so you don't need to do anything Dafna.
Regards,
Hans