because mppFrame update increase reference,so correct the fd operation

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1052 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
GaoZhili
2016-07-20 08:50:39 +00:00
parent 4db17e27c6
commit dad60fe8ff

View File

@@ -401,7 +401,7 @@ RK_S32 VpuApiLegacy::encode(VpuCodecContext *ctx, EncInputStream_t *aEncInStrm,
mpp_frame_set_ver_stride(inputFrame, verStride);
if (!use_fd_flag) {
RK_U32 outputBufferSize = horStride * verStride;
RK_U32 outputBufferSize = horStride * verStride;
ret = mpp_buffer_get(memGroup, &pictureMem, aEncInStrm->size);
if (ret != MPP_OK) {
mpp_err( "Failed to allocate pictureMem buffer!\n");
@@ -514,6 +514,8 @@ RK_S32 VpuApiLegacy::encode(VpuCodecContext *ctx, EncInputStream_t *aEncInStrm,
mpp_log("outputPacket is NULL!");
}
if (pictureMem)
mpp_buffer_put(pictureMem);
if (inputFrame) {
mpp_frame_deinit(&inputFrame);
inputFrame = NULL;