mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
media: recover calculated disp pts for video
PD#153240: add disp pts in vf for some unstable pts Change-Id: I1d4cfd04c94feafac109bd69be3bd422aca3d8bf Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
d383851245
commit
442caae23c
@@ -895,7 +895,15 @@ void safe_disble_videolayer(void)
|
||||
/*********************************************************/
|
||||
static inline struct vframe_s *video_vf_peek(void)
|
||||
{
|
||||
return vf_peek(RECEIVER_NAME);
|
||||
struct vframe_s *vf = vf_peek(RECEIVER_NAME);
|
||||
|
||||
if (vf && vf->disp_pts && vf->disp_pts_us64) {
|
||||
vf->pts = vf->disp_pts;
|
||||
vf->pts_us64 = vf->disp_pts_us64;
|
||||
vf->disp_pts = 0;
|
||||
vf->disp_pts_us64 = 0;
|
||||
}
|
||||
return vf;
|
||||
}
|
||||
|
||||
static inline struct vframe_s *video_vf_get(void)
|
||||
@@ -905,6 +913,12 @@ static inline struct vframe_s *video_vf_get(void)
|
||||
vf = vf_get(RECEIVER_NAME);
|
||||
|
||||
if (vf) {
|
||||
if (vf->disp_pts && vf->disp_pts_us64) {
|
||||
vf->pts = vf->disp_pts;
|
||||
vf->pts_us64 = vf->disp_pts_us64;
|
||||
vf->disp_pts = 0;
|
||||
vf->disp_pts_us64 = 0;
|
||||
}
|
||||
video_notify_flag |= VIDEO_NOTIFY_PROVIDER_GET;
|
||||
atomic_set(&vf->use_cnt, 1);
|
||||
/*always to 1,for first get from vfm provider */
|
||||
|
||||
@@ -237,6 +237,8 @@ struct vframe_s {
|
||||
u32 duration_pulldown;
|
||||
u32 pts;
|
||||
u64 pts_us64;
|
||||
u32 disp_pts;
|
||||
u64 disp_pts_us64;
|
||||
u32 flag;
|
||||
|
||||
u32 canvas0Addr;
|
||||
|
||||
Reference in New Issue
Block a user