From 21cba5ad49a1cf7f2892f5bc1bcae2b9dcb8a543 Mon Sep 17 00:00:00 2001 From: Shi Zhongbo Date: Mon, 3 Aug 2020 16:21:45 +0800 Subject: [PATCH] msm: vidc: fix time stamp store and fetch Fix to skip time stamp store and fetch for buffers with codec config flag. Change-Id: I867db519c45751ef2dadef5a323c7a4ad2741385 Signed-off-by: Shi Zhongbo --- msm/vidc/msm_vidc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_vidc.c b/msm/vidc/msm_vidc.c index d0d6b128983a..c2125e6a8330 100644 --- a/msm/vidc/msm_vidc.c +++ b/msm/vidc/msm_vidc.c @@ -437,7 +437,9 @@ int msm_vidc_qbuf(void *instance, struct media_device *mdev, msm_comm_release_timestamps(inst); inst->flush_timestamps = false; - rc = msm_comm_store_timestamp(inst, timestamp_us); + if (!(b->flags & V4L2_BUF_FLAG_CODECCONFIG)) + rc = msm_comm_store_timestamp(inst, timestamp_us); + if (rc) goto unlock; inst->clk_data.frame_rate = msm_comm_get_max_framerate(inst); @@ -508,7 +510,9 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b) return -EINVAL; } } - if (is_decode_session(inst) && b->type == OUTPUT_MPLANE) + if (is_decode_session(inst) && + b->type == OUTPUT_MPLANE && + !(b->flags & V4L2_BUF_FLAG_CODECCONFIG)) msm_comm_fetch_ts_framerate(inst, b); return rc;