Skip to content

Commit 3de21f4

Browse files
Ming Qianopsiff
authored andcommitted
media: amphion: Clear last_buffer_dequeued flag for DEC_CMD_START
[ Upstream commit d85f320 ] The V4L2_DEC_CMD_START command may be used to handle the dynamic source change, which will triggers an implicit decoder drain. The last_buffer_dequeued flag is set in the implicit decoder drain, so driver need to clear it to continue the following decoding flow. Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit f5a5a824f0acbf331ea89aada14546ddfc4166b0) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 902e3c2 commit 3de21f4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/media/platform/amphion

drivers/media/platform/amphion/vdec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ static int vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd
630630
switch (cmd->cmd) {
631631
case V4L2_DEC_CMD_START:
632632
vdec_cmd_start(inst);
633+
vb2_clear_last_buffer_dequeued(v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx));
633634
break;
634635
case V4L2_DEC_CMD_STOP:
635636
vdec_cmd_stop(inst);

0 commit comments

Comments
 (0)