mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-03 04:30:15 +08:00
parent
2f4cd67162
commit
9933398614
@ -2252,4 +2252,4 @@
|
||||
"value": "__defaultVhost__"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -205,6 +205,9 @@ Frame::Ptr Factory::getFrameFromPtr(CodecId codec, const char *data, size_t byte
|
||||
|
||||
Frame::Ptr Factory::getFrameFromBuffer(CodecId codec, Buffer::Ptr data, uint64_t dts, uint64_t pts) {
|
||||
auto frame = Factory::getFrameFromPtr(codec, data->data(), data->size(), dts, pts);
|
||||
if(!frame){
|
||||
return nullptr;
|
||||
}
|
||||
return std::make_shared<FrameCacheAble>(frame, false, std::move(data));
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,10 @@ void DecoderImp::onDecode(int stream, int codecid, int flags, int64_t pts, int64
|
||||
if (!ref.first) {
|
||||
onTrack(stream, Factory::getTrackByCodecId(codec, 8000, 1, 16));
|
||||
}
|
||||
if (!ref.first) {
|
||||
WarnL << "not support codec :" << getCodecName(codec);
|
||||
return;
|
||||
}
|
||||
auto frame = Factory::getFrameFromPtr(codec, (char *)data, bytes, dts, pts);
|
||||
if (getTrackType(codec) != TrackVideo) {
|
||||
onFrame(stream, frame);
|
||||
|
Loading…
Reference in New Issue
Block a user