mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 17:27:33 +08:00
编码H264时支持时间戳透传,修复时间戳相关问题
This commit is contained in:
@@ -321,6 +321,8 @@ int H264Encoder::inputData(char *yuv[3], int linesize[3], int64_t cts, H264Frame
|
||||
_aFrames[i].iType = pNal.i_type;
|
||||
_aFrames[i].iLength = pNal.i_payload;
|
||||
_aFrames[i].pucData = pNal.p_payload;
|
||||
_aFrames[i].dts = _pPicOut->i_dts;
|
||||
_aFrames[i].pts = _pPicOut->i_pts;
|
||||
}
|
||||
*out_frame = _aFrames;
|
||||
return iNal;
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
int iType;
|
||||
int iLength;
|
||||
uint8_t *pucData;
|
||||
|
||||
int64_t dts;
|
||||
int64_t pts;
|
||||
} H264Frame;
|
||||
|
||||
H264Encoder();
|
||||
|
||||
Reference in New Issue
Block a user