On Mon, 2019-04-08 at 14:32 +0200, Philipp Zabel wrote:
> The memory-to-memory stateful video decoder interface documentation
> requires the decoder stop command initiating the drain sequence to have
> flags set to zero.
> Stop to black makes no sense as stopped memory-to-memory decoders do not
> produce any frames, and stopping immediately can be achieved by stopping
> the output video queue with VIDIOC_STREAMOFF.
> 
> The mute audio start command flag serves no purpose as the coda driver
> does not handle any audio formats, and does not support playback at
> non-standard speeds.
> 
> Signed-off-by: Philipp Zabel <p.za...@pengutronix.de>
> ---
>  drivers/media/platform/coda/coda-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/coda/coda-common.c 
> b/drivers/media/platform/coda/coda-common.c
> index 318f0be103bb..96798f98734a 100644
> --- a/drivers/media/platform/coda/coda-common.c
> +++ b/drivers/media/platform/coda/coda-common.c
> @@ -1050,10 +1050,10 @@ static int coda_try_decoder_cmd(struct file *file, 
> void *fh,
>       if (dc->cmd != V4L2_DEC_CMD_STOP)
>               return -EINVAL;
>  
> -     if (dc->flags & V4L2_DEC_CMD_STOP_TO_BLACK)
> +     if (dc->stop.pts != 0)
>               return -EINVAL;
>  
> -     if (!(dc->flags & V4L2_DEC_CMD_STOP_IMMEDIATELY) && (dc->stop.pts != 0))
> +     if (dc->flags != 0)
>               return -EINVAL;

This change currently causes a v4l2-compliance failure

                fail: v4l2-test-codecs.cpp(104): ret != 0
        test VIDIOC_(TRY_)DECODER_CMD: FAIL

because it still expects V4L2_DEC_CMD_STOP_IMMEDIATELY to be supported.

regards
Philipp

Reply via email to