mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-26 03:42:21 +08:00
http-ts直播减少一次内存拷贝
This commit is contained in:
@@ -73,8 +73,12 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void onTs(const void *packet, size_t bytes, uint32_t timestamp, bool is_idr_fast_packet) override {
|
||||
_hls->inputData((char *) packet, bytes, timestamp, is_idr_fast_packet);
|
||||
void onTs(std::shared_ptr<Buffer> buffer, uint32_t timestamp, bool is_idr_fast_packet) override {
|
||||
if (!buffer) {
|
||||
_hls->inputData(nullptr, 0, timestamp, is_idr_fast_packet);
|
||||
} else {
|
||||
_hls->inputData(buffer->data(), buffer->size(), timestamp, is_idr_fast_packet);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user