From fa6ba91951a883c90a12531ffdd47f2f806e4869 Mon Sep 17 00:00:00 2001 From: Peng Yixin Date: Wed, 1 Aug 2018 19:20:44 +0800 Subject: [PATCH] vmh264: fix block in isr thread. PD#167539 max_frame_num value exceeds the maximum value in the specification, and that cause block. judge the validity of max_frame_num value to solve this issue. Change-Id: Ic08e3f419e18d823cee4d0309b940dffa2058249 Signed-off-by: Peng Yixin --- .../media_modules/frame_provider/decoder/h264_multi/h264_dpb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c index 7e810a40c34e..0f297a6cb86c 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/h264_dpb.c @@ -9,6 +9,8 @@ #include "h264_dpb.h" +#define FRAME_NUM_MAX_SIZE 0x10000 + #undef pr_info #define pr_info printk int dpb_print(int index, int debug_flag, const char *fmt, ...) @@ -5612,6 +5614,7 @@ int h264_slice_header_process(struct h264_dpb_stru *p_H264_Dpb) p_Vid->pre_frame_num, p_Vid->max_frame_num); if (p_Vid->recovery_point == 0 && + p_Vid->max_frame_num <= FRAME_NUM_MAX_SIZE && currSlice->frame_num != p_Vid->pre_frame_num && currSlice->frame_num != (p_Vid->pre_frame_num + 1) % p_Vid->max_frame_num) {