fix[test]: Fix test demo stuck issue

When reading file from start over, buffer got from list should be put
back. Otherwise buffer list will have no more buffer available after
rewinding BUF_COUNT (which is 4 currently) times.

Change-Id: If346e1824bd876cf2d6c226c97c1dec17dc9b56f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
This commit is contained in:
Johnson Ding
2024-09-04 18:08:16 +08:00
committed by Herman Chen
parent 85208c99b0
commit 6f0f337f71

View File

@@ -710,6 +710,10 @@ void *enc_test_input(void *arg)
rewind(p->fp_input);
p->frm_eos = 0;
mpp_log_q(quiet, "chn %d loop times %d\n", chn, ++p->loop_times);
if (buffer) {
AutoMutex autolock(list_buf->mutex());
list_buf->add_at_tail(&buffer, sizeof(buffer));
}
continue;
}
mpp_log_q(quiet, "chn %d found last frame. feof %d\n", chn, feof(p->fp_input));