优化DevChannel内存拷贝问题

This commit is contained in:
xiongziliang 2020-01-08 12:15:59 +08:00
parent 57c5d2963a
commit 5d2864cff2

View File

@ -110,6 +110,7 @@ void DevChannel::inputH264(const char* pcData, int iDataLen, uint32_t dts,uint32
frame->ptsStamp = pts;
frame->buffer.assign("\x00\x00\x00\x01",4);
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
frame->iPrefixSize = 4;
inputFrame(frame);
}
@ -134,6 +135,7 @@ void DevChannel::inputH265(const char* pcData, int iDataLen, uint32_t dts,uint32
frame->ptsStamp = pts;
frame->buffer.assign("\x00\x00\x00\x01",4);
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
frame->iPrefixSize = 4;
inputFrame(frame);
}