-rw-r--r-- | drivers/frame_provider/decoder/h264_multi/vmh264.c | 8 | ||||
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 4 |
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; |