[PATCH 1/3] media: venus: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE

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

 



when V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE is chosen,
the first buffer only contains stream header,
so apply the flag V4L2_BUF_FLAG_HEADERS_ONLY

Signed-off-by: Ming Qian <ming.qian@xxxxxxx>
---
 drivers/media/platform/qcom/venus/venc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index cdb12546c4fa..33c8e4329f6e 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1260,6 +1260,9 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type,
 		vb->planes[0].data_offset = data_offset;
 		vb->timestamp = timestamp_us * NSEC_PER_USEC;
 		vbuf->sequence = inst->sequence_cap++;
+		if (inst->controls.enc.header_mode == V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE &&
+		    !vbuf->sequence)
+			vbuf->flags |= V4L2_BUF_FLAG_HEADERS_ONLY;
 	} else {
 		vbuf->sequence = inst->sequence_out++;
 	}
-- 
2.38.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