[PATCH 10/10] media: coda: require all decoder command flags to be cleared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.zabel@xxxxxxxxxxxxxx>
---
 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;
 
 	return 0;
-- 
2.20.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux