mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
优化DevChannel内存拷贝问题
This commit is contained in:
parent
57c5d2963a
commit
5d2864cff2
@ -110,6 +110,7 @@ void DevChannel::inputH264(const char* pcData, int iDataLen, uint32_t dts,uint32
|
|||||||
frame->ptsStamp = pts;
|
frame->ptsStamp = pts;
|
||||||
frame->buffer.assign("\x00\x00\x00\x01",4);
|
frame->buffer.assign("\x00\x00\x00\x01",4);
|
||||||
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
|
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
|
||||||
|
frame->iPrefixSize = 4;
|
||||||
inputFrame(frame);
|
inputFrame(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ void DevChannel::inputH265(const char* pcData, int iDataLen, uint32_t dts,uint32
|
|||||||
frame->ptsStamp = pts;
|
frame->ptsStamp = pts;
|
||||||
frame->buffer.assign("\x00\x00\x00\x01",4);
|
frame->buffer.assign("\x00\x00\x00\x01",4);
|
||||||
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
|
frame->buffer.append(pcData + prefixeSize, iDataLen - prefixeSize);
|
||||||
|
frame->iPrefixSize = 4;
|
||||||
inputFrame(frame);
|
inputFrame(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user