From ed85ef9aa533263c872a35e67f0382179e0d73b7 Mon Sep 17 00:00:00 2001 From: "Yao.Liu" Date: Tue, 5 Sep 2017 17:05:37 +0800 Subject: [PATCH] amlvideo: set omx output buffer size to compWidth*compHeight PD#150218: amlvideo: set omx output buffer size to compWidth*compHeight Change-Id: I69ff2e5defb8344cd4aec05582f4696faa0abe7f Signed-off-by: Yao.Liu --- drivers/amlogic/media/video_processor/video_dev/amlvideo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/video_processor/video_dev/amlvideo.c b/drivers/amlogic/media/video_processor/video_dev/amlvideo.c index c3e41c5..66453e3 100644 --- a/drivers/amlogic/media/video_processor/video_dev/amlvideo.c +++ b/drivers/amlogic/media/video_processor/video_dev/amlvideo.c @@ -538,8 +538,14 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p) p->timestamp.tv_sec = pts_us64 >> 32; p->timestamp.tv_usec = pts_us64 & 0xFFFFFFFF; dev->last_pts_us64 = pts_us64; - p->timecode.type = dev->vf->width; - p->timecode.flags = dev->vf->height; + + if ((dev->vf->type & VIDTYPE_COMPRESS) != 0) { + p->timecode.type = dev->vf->compWidth; + p->timecode.flags = dev->vf->compHeight; + } else { + p->timecode.type = dev->vf->width; + p->timecode.flags = dev->vf->height; + } vf_notify_receiver( dev->vf_provider_name, -- 2.7.4