首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >macos下使用trtc的cpp接口sendCustomVideoData崩溃?

macos下使用trtc的cpp接口sendCustomVideoData崩溃?

提问于 2020-12-31 11:18:08
回答 0关注 0查看 150

macos 10.15.7

使用的cpp接口,TXLiteAVSDK_TRTC_Mac版本8.2.9808

如果在调用sendCustomVideoData后释放内存就会崩溃,不释放就会内存泄漏(从资源管理器可以看到内存占用在持续升高)

TRTCVideoFrame frame;

frame.videoFormat = TRTCVideoPixelFormat_I420;

frame.bufferType = TRTCVideoBufferType_Buffer;

frame.width = 1280;

frame.height = 720;

frame.length = (1280*720*3)/2;

frame.rotation = TRTCVideoRotation0;

frame.data = (char*)malloc(frame.length);

memset(frame.data,0,frame.length);

frame.timestamp = 0;

mEngine->sendCustomVideoData(&frame);

free(frame.data);

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档