diff options
author | Som Qin <som.qin@starfivetech.com> | 2023-08-29 05:18:47 +0300 |
---|---|---|
committer | Som Qin <som.qin@starfivetech.com> | 2023-08-30 06:15:29 +0300 |
commit | 9aea96f91ea6f45326c8dc5572a085002750a951 (patch) | |
tree | 17f95ca1ae4465f8108f4c1b748dc941c2720029 | |
parent | b4e474a223e8c85638d084e3319db038a76a1351 (diff) | |
download | linux-9aea96f91ea6f45326c8dc5572a085002750a951.tar.xz |
Media:Wave5: Fix segment fault when finish buffer
Signed-off-by: Som Qin <som.qin@starfivetech.com>
-rw-r--r-- | drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index 481273d9ceb3..fda9090315a6 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -316,6 +316,11 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst) v4l2_m2m_dst_buf_remove_by_idx(inst->v4l2_fh.m2m_ctx, dec_output_info.index_frame_display); + if (!dst_buf) { + dev_dbg(inst->dev->dev,"find no dst_buf \n"); + return; + } + stride = dec_output_info.disp_frame.stride; height = dec_output_info.disp_pic_height - dec_output_info.rc_display.bottom; |