summaryrefslogtreecommitdiff
authorBrian Zhu <brian.zhu@amlogic.com>2019-11-28 16:58:03 (GMT)
committer Zhi Zhou <zhi.zhou@amlogic.com>2019-12-02 07:00:02 (GMT)
commit442dc911d86a861df9c058025eef816e05b63a1c (patch)
treee0594dcb6916eceeee0c062dc06d790a0055d7b0
parent64e0643449da0075b986a288791fb10773ed238f (diff)
downloadmedia_modules-442dc911d86a861df9c058025eef816e05b63a1c.zip
media_modules-442dc911d86a861df9c058025eef816e05b63a1c.tar.gz
media_modules-442dc911d86a861df9c058025eef816e05b63a1c.tar.bz2
decoder: add interface to get vf put count [2/2]
PD#SWPL-17393 Problem: dv el can not drop frame Solution: add vf put count for drop frame Verify: verified on u212 Change-Id: I5fa699b44f174b27e4a8046cbb026563ea7fb107 Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
Diffstat
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c8
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c4
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index 7a3acbd..144cd9f 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -3854,7 +3854,13 @@ static int vh264_event_cb(int type, void *data, void *op_arg)
if (type & VFRAME_EVENT_RECEIVER_GET_AUX_DATA) {
struct provider_aux_req_s *req =
(struct provider_aux_req_s *)data;
- int buf_spec_num = BUFSPEC_INDEX(req->vf->index);
+ int buf_spec_num;
+
+ if (!req->vf) {
+ req->aux_size = hw->vf_put_count;
+ return 0;
+ }
+ buf_spec_num = BUFSPEC_INDEX(req->vf->index);
spin_lock_irqsave(&hw->lock, flags);
req->aux_buf = NULL;
req->aux_size = 0;
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c
index ea12ba1..714ae42 100644
--- a/drivers/frame_provider/decoder/h265/vh265.c
+++ b/drivers/frame_provider/decoder/h265/vh265.c
@@ -8189,6 +8189,10 @@ static int vh265_event_cb(int type, void *data, void *op_arg)
(struct provider_aux_req_s *)data;
unsigned char index;
+ if (!req->vf) {
+ req->aux_size = hevc->vf_put_count;
+ return 0;
+ }
spin_lock_irqsave(&lock, flags);
index = req->vf->index & 0xff;
req->aux_buf = NULL;