vh265: CB2 H265 can't get eos buffer and freeze. [1/1]
PD#SWPL-195898
Problem:
When fast forwarding to the end of the stream,
the eos buf acquisition failed due to the
eos flag not being set to true.
Solution:
Before obtaining the cap buf in the eos frame,
the eos flag needs to be set to true
Verify:
AT301
Signed-off-by: kun.liu <kun.liu@amlogic.com>
Change-Id: Ibd67a57137246cc6d7d46915f8105295ae3f11c8
diff --git a/drivers/frame_provider/decoder_v4l/h265/vh265.c b/drivers/frame_provider/decoder_v4l/h265/vh265.c
index 294d20e..fe10815 100644
--- a/drivers/frame_provider/decoder_v4l/h265/vh265.c
+++ b/drivers/frame_provider/decoder_v4l/h265/vh265.c
@@ -11125,6 +11125,7 @@
usleep_range(500, 1000);
}
+ hw->eos = true;
pic = v4l_get_new_pic(hw, NULL);
if (NULL == pic) {
pr_err("[%d] H265 EOS get free buff fail.\n", ctx->id);
@@ -11136,7 +11137,6 @@
else
aml_buf = (struct aml_buf *)hw->m_BUF[pic->index].v4l_ref_buf_addr;
- hw->eos = true;
vf->type |= VIDTYPE_V4L_EOS;
vf->timestamp = ULLONG_MAX;
vf->flag = VFRAME_FLAG_EMPTY_FRAME_V4L;