author | apollo.ling <apollo.ling@amlogic.com> | 2020-09-27 07:05:38 (GMT) |
---|---|---|
committer | Shen Liu <shen.liu@amlogic.com> | 2020-09-28 07:05:12 (GMT) |
commit | 23ebf7a29d5c8c08ad34cc56881a5ed940f3ef23 (patch) | |
tree | 512114e0c6835c253d007426ed18601bc62d637f | |
parent | 14cca6de4524063b693a867829590ea6a170a454 (diff) | |
download | media_modules-23ebf7a29d5c8c08ad34cc56881a5ed940f3ef23.zip media_modules-23ebf7a29d5c8c08ad34cc56881a5ed940f3ef23.tar.gz media_modules-23ebf7a29d5c8c08ad34cc56881a5ed940f3ef23.tar.bz2 |
vdec: avoid to use NULL pointer [1/1]
PD#SWPL-34229
Problem:
DTV H264 cut off, null pointer crashes
Solution:
Check the pointer before using it
Verify:
T962X3-AB301
Change-Id: I49075e3f3d2018f70e19f356e577a80fd70cdb2f
Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index a0994fd..5423003 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -2714,10 +2714,12 @@ int prepare_display_buf(struct vdec_s *vdec, struct FrameStore *frame) vf->pts_us64 = 0; } - dpb_print(DECODE_ID(hw), PRINT_FLAG_DPB_DETAIL, - "%s %d type = 0x%x pic_struct = %d pts = 0x%x pts_us64 = 0x%llx bForceInterlace = %d\n", - __func__, __LINE__, vf->type, frame->frame->pic_struct, - vf->pts, vf->pts_us64, bForceInterlace); + if (frame->frame) { + dpb_print(DECODE_ID(hw), PRINT_FLAG_DPB_DETAIL, + "%s %d type = 0x%x pic_struct = %d pts = 0x%x pts_us64 = 0x%llx bForceInterlace = %d\n", + __func__, __LINE__, vf->type, frame->frame->pic_struct, + vf->pts, vf->pts_us64, bForceInterlace); + } } if (i == 0) { unsigned long jiffies_diff; |