summaryrefslogtreecommitdiff
path: root/drivers/media/platform/mtk-vcodec
diff options
context:
space:
mode:
authorTomasz Figa <tfiga@chromium.org>2018-01-09 11:42:47 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-26 15:41:36 +0300
commitc2e0e1ba6c5c25e45ff3da1f16e013c5910bee58 (patch)
treecdfb9a3a96fb0b59db15f6fb8cc7a0ac9fefc8e5 /drivers/media/platform/mtk-vcodec
parent50e7044535537b2a54c7ab798cd34c7f6d900bd2 (diff)
downloadlinux-c2e0e1ba6c5c25e45ff3da1f16e013c5910bee58.tar.xz
media: mtk-vcodec: Always signal source change event on format change
Currently the driver signals the source change event only in case of a midstream resolution change, however the initial format detection is also defined as a source change by the V4L2 codec API specification. Fix this by signaling the event after the initial header is parsed as well. Signed-off-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/mtk-vcodec')
-rw-r--r--drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 843510979ad8..86f0a7134365 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -1224,6 +1224,8 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb)
ctx->dpb_size = dpbsize;
ctx->state = MTK_STATE_HEADER;
mtk_v4l2_debug(1, "[%d] dpbsize=%d", ctx->id, ctx->dpb_size);
+
+ mtk_vdec_queue_res_chg_event(ctx);
}
static void vb2ops_vdec_buf_finish(struct vb2_buffer *vb)