summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorapollo.ling <apollo.ling@amlogic.com>2020-12-24 20:15:19 +0800
committerHui Zhang <hui.zhang@amlogic.com>2020-12-25 00:01:26 -0800
commitf4ee88db4efb17a46abcfda29d0a11b156d104e7 (patch)
tree479bfa7485e07eb5b50bbae1d35cfe14e72a9de0
parente6b95fd8ea67c54d1226d4a2a40828f7d4ce12d4 (diff)
downloadmedia_modules-f4ee88db4efb17a46abcfda29d0a11b156d104e7.tar.gz
vdec: check the pointer before using it [1/1]
PD#SWPL-38329 Problem: play special stream,DUT reboot when stream replay Solution: Check the pointer before using it Verify: ah212 Change-Id: I53a1e2643f00513cae307aa61ed90f32c71bba65 Signed-off-by: apollo.ling <apollo.ling@amlogic.com>
-rw-r--r--drivers/frame_provider/decoder/h264_multi/h264_dpb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
index 874b5f3..523ce9f 100644
--- a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
+++ b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
@@ -5313,9 +5313,10 @@ static void reorder_lists(struct Slice *currSlice)
PRINT_FLAG_DPB_DETAIL,
"listX[1] reorder (PicNum): ");
for (i = 0; i < currSlice->listXsize[1]; i++) {
- dpb_print_cont(p_H264_Dpb->decoder_index,
- PRINT_FLAG_DPB_DETAIL, "%d ",
- currSlice->listX[1][i]->pic_num);
+ if (currSlice->listX[1][i])
+ dpb_print_cont(p_H264_Dpb->decoder_index,
+ PRINT_FLAG_DPB_DETAIL, "%d ",
+ currSlice->listX[1][i]->pic_num);
}
dpb_print_cont(p_H264_Dpb->decoder_index,
PRINT_FLAG_DPB_DETAIL, "\n");