v4l: gst playback abnormal. [1/1]
authorNanxin Qin <nanxin.qin@amlogic.com>
Tue, 23 Jun 2020 08:45:19 +0000 (16:45 +0800)
committerNanxin Qin <nanxin.qin@amlogic.com>
Sun, 28 Jun 2020 02:16:13 +0000 (19:16 -0700)
PD#SWPL-28377

Problem:
after update media_module to 0616 version, the gst over v4l2
playback is not working.

Solution:
the wrong of configuration of the output buffer mode that
caused allocate buffer failed.

Verify:
w200

Change-Id: I4adf8f082e7b67b495280894408b0363bdaeb190
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
drivers/amvdec_ports/aml_vcodec_dec.c

index bb6eee455b4c3f8a072b5e83a0eca0390efa4b42..2d426d1ab4340f81d2d4e842b4b32a64dd547043 100644 (file)
@@ -1248,11 +1248,11 @@ static int vidioc_decoder_reqbufs(struct file *file, void *priv,
                        //rb->count = ctx->dpb_size;
                }
        } else {
-               if (rb->memory == VB2_MEMORY_DMABUF) {
-                       v4l_dbg(ctx, V4L_DEBUG_CODEC_INPUT,
-                                       "%s, output_dma_mode set", __func__);
-                       ctx->output_dma_mode = true;
-               }
+               ctx->output_dma_mode =
+                       (rb->memory == VB2_MEMORY_DMABUF) ? 1 : 0;
+
+               v4l_dbg(ctx, V4L_DEBUG_CODEC_INPUT,
+                       "output buffer memory mode is %d\n", rb->memory);
        }
 
        return v4l2_m2m_ioctl_reqbufs(file, priv, rb);