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/mediatek/vcodec/mtk_vcodec_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c index d65800a3b89d..0563abceb858 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c @@ -1090,6 +1090,7 @@ static int mtk_venc_encode_header(void *priv) ctx->state = MTK_STATE_HEADER; vb2_set_plane_payload(&dst_buf->vb2_buf, 0, enc_result.bs_size); + dst_buf->flags |= V4L2_BUF_FLAG_HEADERS_ONLY; v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_DONE); return 0; -- 2.38.1