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)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:27:23 +0000 (14:27 +0800)
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 f65c24a..615631c 100644 (file)
@@ -238,7 +238,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,
@@ -273,7 +274,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]);
                        vfq_init(&dev->q_omx, AMLVIDEO_POOL_SIZE + 1,