mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpp]: cancel release mpp_frame in put_frame api
NOTE: This change may effect some existed program. MPP caller should always follow the rule that the resouce creator must be the resource destoryer. So caller of encode_put_frame should release the input MppFrame structure and MPP should not release the input frame. Change-Id: I36897dbbf1697002ae64868f2385961472eeb7c5 Signed-off-by: Francis Fan <francis.fan@rock-chips.com> Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -415,11 +415,20 @@ MPP_RET test_mpp_run(MpiEncTestData *p)
|
||||
else
|
||||
mpp_frame_set_buffer(frame, p->frm_buf);
|
||||
|
||||
/*
|
||||
* NOTE: in non-block mode the frame can be resent.
|
||||
* The default input timeout mode is block.
|
||||
*
|
||||
* User should release the input frame to meet the requirements of
|
||||
* resource creator must be the resource destroyer.
|
||||
*/
|
||||
ret = mpi->encode_put_frame(ctx, frame);
|
||||
if (ret) {
|
||||
mpp_err("mpp encode put frame failed\n");
|
||||
mpp_frame_deinit(&frame);
|
||||
goto RET;
|
||||
}
|
||||
mpp_frame_deinit(&frame);
|
||||
|
||||
ret = mpi->encode_get_packet(ctx, &packet);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user