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 <yixin.peng@amlogic.com>
This commit is contained in:
Peng Yixin
2018-08-01 19:20:44 +08:00
committed by Dongjin Kim
parent 38250cbd4a
commit fa6ba91951

View File

@@ -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) {