mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
media: fixes an issue where the CTS cause the kernel crash
PD#161202: recycles the vf data before must to be checked. Change-Id: Ief413c5169d859be632f4799d6897ae1322e2fbb Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
This commit is contained in:
@@ -6132,6 +6132,7 @@ static void set_omx_pts(u32 *p)
|
||||
u32 set_from_hwc = p[2];
|
||||
u32 frame_num = p[3];
|
||||
u32 not_reset = p[4];
|
||||
unsigned int try_cnt = 0x1000;
|
||||
|
||||
mutex_lock(&omx_mutex);
|
||||
if (omx_pts_set_index < frame_num)
|
||||
@@ -6155,12 +6156,13 @@ static void set_omx_pts(u32 *p)
|
||||
} else if (set_from_hwc == 0 && !omx_run) {
|
||||
struct vframe_s *vf = NULL;
|
||||
|
||||
while (1) {
|
||||
while (try_cnt--) {
|
||||
vf = vf_peek(RECEIVER_NAME);
|
||||
if (vf) {
|
||||
if (frame_num >= vf->omx_index) {
|
||||
vf = vf_get(RECEIVER_NAME);
|
||||
vf_put(vf, RECEIVER_NAME);
|
||||
if (vf)
|
||||
vf_put(vf, RECEIVER_NAME);
|
||||
} else
|
||||
break;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user