编码H264时支持时间戳透传,修复时间戳相关问题

This commit is contained in:
xiongziliang
2024-06-02 13:34:51 +08:00
parent 189b02e400
commit 4cd735f61d
3 changed files with 6 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ bool DevChannel::inputYUV(char *yuv[3], int linesize[3], uint64_t cts) {
int frames = _pH264Enc->inputData(yuv, linesize, cts, &out_frames);
bool ret = false;
for (int i = 0; i < frames; i++) {
ret = inputH264((char *) out_frames[i].pucData, out_frames[i].iLength, cts) ? true : ret;
ret = inputH264((char *) out_frames[i].pucData, out_frames[i].iLength, out_frames[i].dts, out_frames[i].pts) ? true : ret;
}
return ret;
}