amlvideo: pip channel not set omx_secret_mode [1/1]
authorjintao xu <jintao.xu@amlogic.com>
Wed, 8 May 2019 05:56:17 +0000 (13:56 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Wed, 8 May 2019 07:10:39 +0000 (00:10 -0700)
PD#OTT-2783

Problem:
when the second channel exit, the first channel will freeze

Solution:
pip not need set omx_secret_mode

Verify:
U212

Change-Id: I1f5f2624699ad29df06f67b288d16a15ab4edcf9
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
drivers/amlogic/media/video_processor/video_dev/amlvideo.c

index 35fac2a..f8528f1 100644 (file)
@@ -235,7 +235,8 @@ static int video_receiver_event_fun(int type, void *data, void *private_data)
                if (vf_get_receiver(dev->vf_provider_name)) {
                        AMLVIDEO_DBG("unreg:amlvideo\n");
                        vf_unreg_provider(&dev->video_vf_prov);
-                       omx_secret_mode = false;
+                       if (dev->inst == 0)
+                               omx_secret_mode = false;
                }
                dev->first_frame = 0;
                vfq_init(&dev->q_ready, AMLVIDEO_POOL_SIZE + 1,
@@ -268,7 +269,8 @@ static int video_receiver_event_fun(int type, void *data, void *private_data)
                        struct vframe_receiver_s *aaa = vf_get_receiver(
                                dev->vf_provider_name);
                        AMLVIDEO_DBG("aaa->name=%s", aaa->name);
-                       omx_secret_mode = true;
+                       if (dev->inst == 0)
+                               omx_secret_mode = true;
                        vfq_init(&dev->q_ready, AMLVIDEO_POOL_SIZE + 1,
                                        &dev->amlvideo_pool_ready[0]);
                        vf_provider_init(&dev->video_vf_prov,