author | apollo.ling <apollo.ling@amlogic.com> | 2020-07-08 13:25:12 (GMT) |
---|---|---|
committer | Hui Zhang <hui.zhang@amlogic.com> | 2020-07-21 03:26:25 (GMT) |
commit | 27ca6de74aab958482dea3eaf4718b93356c2977 (patch) | |
tree | 8714ca39eb765118b2165c9217c454ebbcffaaae | |
parent | 0d05325ed3f04d98a838a28b3c7b15d365dfaaad (diff) | |
download | media_modules-27ca6de74aab958482dea3eaf4718b93356c2977.zip media_modules-27ca6de74aab958482dea3eaf4718b93356c2977.tar.gz media_modules-27ca6de74aab958482dea3eaf4718b93356c2977.tar.bz2 |
vdec: h265 check and avoid NULL pointer [1/1]
PD#SWPL-29760
Problem:
In some cases h265 there is a NULL pointer used
Solution:
Check and avoid to use NULL pointer
Verify:
T962X3
Change-Id: Ic1f3b24c065cd23163ef5dd0caca7b8a7fb488b9
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 122e8bc..5a89fc9 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -10207,7 +10207,7 @@ force_output: reset_process_time(hevc); if (aux_data_is_avaible(hevc)) dolby_get_meta(hevc); - if(hevc->cur_pic->slice_type == 2 && + if(hevc->cur_pic && hevc->cur_pic->slice_type == 2 && hevc->vf_pre_count == 0) { hevc_print(hevc, 0, "first slice_type %x no_switch_dvlayer_count %x\n", @@ -11869,7 +11869,10 @@ static void timeout_process(struct hevc_state_s *hevc) * In this very timeout point,the vh265_work arrives, * let it to handle the scenario. */ - if (work_pending(&hevc->work)) + if (work_pending(&hevc->work) || + work_busy(&hevc->work) || + work_pending(&hevc->timeout_work) || + work_busy(&hevc->timeout_work)) return; hevc->timeout_num++; |