summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2017-01-16 19:18:07 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2017-01-17 15:11:44 +0900
commitdae19de8c3fb0ca80a0506205ff2a245dea56503 (patch)
treea11130faf2e514c6a743cdf81a5c33c3eaec770f
parent4c65cce4394c87c26e75460a76005d0c82fea466 (diff)
downloadlinux-exynos-accepted/tizen_3.0_tv.tar.gz
linux-exynos-accepted/tizen_3.0_tv.tar.bz2
linux-exynos-accepted/tizen_3.0_tv.zip
This reverts commit 41250210f58c60c412344089cdebdf895eaf274a. Without allow_zero_byteused flag, during decoding the last EOS buffer with zero bytesused from userspace is not properly processed, so stream is stuck without finishing all queued buffer. Change-Id: I5725d3514885c104febb12adb44b13ae9b527817 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 7af9facc85d4..36d1b52f6e6f 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -880,6 +880,13 @@ static int s5p_mfc_open(struct file *file)
ret = -ENOENT;
goto err_queue_init;
}
+ /* One way to indicate end-of-stream for MFC is to set the
+ * bytesused == 0. However by default videobuf2 handles bytesused
+ * equal to 0 as a special case and changes its value to the size
+ * of the buffer. Set the allow_zero_bytesused flag so that videobuf2
+ * will keep the value of bytesused intact.
+ */
+ q->allow_zero_bytesused = 1;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
ret = vb2_queue_init(q);