[legacy]: fix possible error release frame before display it.

This will cause error buffer to be displayed.

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@696 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-05-07 07:55:14 +00:00
parent 4fbb511549
commit e51e860b65

View File

@@ -259,7 +259,15 @@ RK_S32 VpuApi:: decode_getoutframe(DecoderOut_t *aDecOut)
aDecOut->size = 0;
}
}
mpp_free(mframe);
/*
* IMPORTANT: mframe is malloced frome mpi->decode_get_frame
* So we need to deinit mframe here. But the buffer in the frame should not be free with mframe.
* Because buffer need to be set to vframe->vpumem.offset and send to display.
* The we have to clear the buffer pointer in mframe then release mframe.
*/
mpp_frame_set_buffer(mframe, NULL);
mpp_frame_deinit(&mframe);
} else {
aDecOut->size = 0;
}