From e74dab54579646096e42ffdbf0de8205116a113d Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Mon, 7 Jan 2019 21:10:23 +0800 Subject: [PATCH] vdec: fixed the issue of the pts to set fail with drm mode. [1/1] PD#SWPL-3780 Problem: cast youtube drm video,the video play is very not smooth Solution: fixed the issue of the pts to set fail with drm mode. Verify: p212 Change-Id: I556e3f2cdbc9b90cb90224ffdb3728ec96724ff6 Signed-off-by: Nanxin Qin --- .../media_modules/frame_provider/decoder/utils/vdec_input.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec_input.c b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec_input.c index a4309b088dd4..9b4f01eb45e5 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec_input.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/utils/vdec_input.c @@ -937,6 +937,11 @@ int vdec_input_add_frame(struct vdec_input_s *input, const char *buf, (size_t)drm.drm_pktsize, drm.handle); count -= sizeof(struct drm_info); ret += sizeof(struct drm_info); + + /* the drm frame data might include head infos and raw */ + /* data thus the next drm unit still need a valid pts.*/ + if (count >= sizeof(struct drm_info)) + vdec->pts_valid = true; } } else { ret = vdec_input_add_chunk(input, buf, count, 0);