Toybrick

标题: 连续编码一两天后发生段错误 [打印本页]

作者: zhuo799154051    时间: 2021-2-2 15:41
标题: 连续编码一两天后发生段错误
  1. MPP_RET test_mpp_run(MpiEncTestData* p, void* input_data, size_t bufLen)
  2. {

  3.     MPP_RET ret = MPP_OK;

  4.     MppMeta meta = NULL;
  5.     MppFrame frame = NULL;
  6.     MppPacket packet = NULL;
  7.     void* buf = mpp_buffer_get_ptr(p->frm_buf);

  8.     //TODO: improve performance here?
  9.     memmove(buf, input_data, bufLen);//YUV

  10.     ret = mpp_frame_init(&frame);
  11.     if (ret) {
  12.         printf("mpp_frame_init failed\n");
  13.         goto RET;
  14.     }

  15.     // 后面与demo相同

  16. }
复制代码




上面为我参考https://www.cnblogs.com/xue0708/p/10113302.html修改后的部分代码,原本的编码demo中处理的是文件或者USB摄像头。input_data是推理后的帧。

GDB检测得到的结果如下:
#0  0x0000007fb72c63b8 in __memcpy_generic () at ../sysdeps/aarch64/multiarch/../memcpy.S:170
#1  0x0000005555584410 in test_mpp_run (p=0x7ebc01a7e0, input_data=0x170, bufLen=460800)






欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3