[PATCH 1/2] [media] coda: fix sequence counter increment

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

 



The coda context queue sequence counter is incremented only if the vb2
source buffer payload is non zero. This makes possible to signal EOS
otherwise the condition in coda_buf_is_end_of_stream is never met or more
precisely buf->v4l2_buf.sequence == (ctx->qsequence - 1) never happens.

Signed-off-by: Zahari Doychev <zahari.doychev@xxxxxxxxx>
---
 drivers/media/platform/coda/coda-bit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 109797b..d33f187 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -189,7 +189,8 @@ static int coda_bitstream_queue(struct coda_ctx *ctx,
 	if (n < src_size)
 		return -ENOSPC;
 
-	src_buf->v4l2_buf.sequence = ctx->qsequence++;
+	if (src_size)
+		src_buf->v4l2_buf.sequence = ctx->qsequence++;
 
 	return 0;
 }
-- 
2.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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