author | shihong.zheng <shihong.zheng@amlogic.com> | 2020-03-07 05:54:20 (GMT) |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2020-07-24 06:11:53 (GMT) |
commit | 66932c3654f449f388d263a5fc774b4dc694edcb (patch) | |
tree | d3da2f5f8c80b4026e806fddd9f91df1427bf994 | |
parent | 5d065b959bef04d4c3c84014030257e37e1e4d6a (diff) | |
download | media_modules-66932c3654f449f388d263a5fc774b4dc694edcb.zip media_modules-66932c3654f449f388d263a5fc774b4dc694edcb.tar.gz media_modules-66932c3654f449f388d263a5fc774b4dc694edcb.tar.bz2 |
h265: fix h265 dv crash. [1/1]
PD#SWPL-21687
PD#GH-533
PD#GH-537
BUG=161014557
BUG=160931712
Problem:
h265 dv crash.
some dv data will get after current frame output.
aux data will be changed when cb get aux data.
Solution:
current pic do not output after get new pic.
Verify:
sm1
Change-Id: I85d56a47beb9c92b6361e644ffc5a9b8d9acf2a9
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
Reviewed-on: https://eureka-partner-review.googlesource.com/c/amlogic/media_modules/+/168997
Reviewed-by: Ben Cheng <bccheng@google.com>
Commit-Queue: Ben Cheng <bccheng@google.com>
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 170cc22..506b694 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -3748,7 +3748,7 @@ static struct PIC_s *output_pic(struct hevc_state_s *hevc, unsigned char flush_flag) { int num_pic_not_yet_display = 0; - int i; + int i, fisrt_pic_flag = 0; struct PIC_s *pic; struct PIC_s *pic_display = NULL; struct vdec_s *vdec = hw_to_vdec(hevc); @@ -3796,6 +3796,7 @@ static struct PIC_s *output_pic(struct hevc_state_s *hevc, pic->num_reorder_pic = 0; if (vdec->master || vdec->slave) pic_display = pic; + fisrt_pic_flag = 1; hevc_print(hevc, 0, "VH265: output first frame\n"); } } @@ -3817,10 +3818,21 @@ static struct PIC_s *output_pic(struct hevc_state_s *hevc, decode_idx)) pic_display = pic; + } else pic_display = pic; + } } + /* dv wait cur_pic all data get, + some data may get after picture output */ + if ((vdec->master || vdec->slave) + && (pic_display == hevc->cur_pic) && + (!flush_flag) && + (hevc->bypass_dvenl && !dolby_meta_with_el) + && (!fisrt_pic_flag)) + pic_display = NULL; + if (pic_display) { if ((num_pic_not_yet_display > pic_display->num_reorder_pic) |