From: rongrong zhou Date: Tue, 25 Sep 2018 05:57:05 +0000 (+0800) Subject: video: ignore omx drop frame for dv X-Git-Tag: khadas-vims-v0.9.6-release~1316 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c31a64401155803119dcffa876dfe5afda77125;p=platform%2Fkernel%2Flinux-amlogic.git video: ignore omx drop frame for dv PD#173912 If omx_run is set to false and these frames are not dropped, then it will be stuck at the first second Change-Id: I629f11b10c25180604fa6e3cdfb858f299cc0e64 Signed-off-by: rongrong zhou --- diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 3a28c1c..594a4c2 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -7121,6 +7121,7 @@ static void set_omx_pts(u32 *p) } else if (set_from_hwc == 0 && !omx_run) { struct vframe_s *vf = NULL; + u32 donot_drop = 0; while (try_cnt--) { vf = vf_peek(RECEIVER_NAME); @@ -7129,6 +7130,7 @@ static void set_omx_pts(u32 *p) && vf && is_dovi_frame(vf)) { pr_info("set_omx_pts ignore the omx %d frames drop for dv frame\n", frame_num); + donot_drop = 1; break; } #endif @@ -7144,6 +7146,10 @@ static void set_omx_pts(u32 *p) } else break; } + if (donot_drop && omx_pts_set_from_hwc_count > 0) { + pr_info("reset omx_run to true.\n"); + omx_run = true; + } } mutex_unlock(&omx_mutex); }