mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
兼容一些奇怪的流
This commit is contained in:
parent
09e484794b
commit
faa8786f8f
@ -179,7 +179,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void inputFrame(const Frame::Ptr &frame) override{
|
void inputFrame(const Frame::Ptr &frame) override{
|
||||||
int type = H264_TYPE(*((uint8_t *)frame->data() + frame->prefixSize()));
|
int type = H264_TYPE(*((uint8_t *)frame->data() + frame->prefixSize()));
|
||||||
if(type == H264Frame::NAL_SPS || type == H264Frame::NAL_SEI){
|
if(type == H264Frame::NAL_SPS || type == H264Frame::NAL_PPS || type == H264Frame::NAL_SEI){
|
||||||
//有些设备会把SPS PPS IDR帧当做一个帧打包,所以我们要split一下
|
//有些设备会把SPS PPS IDR帧当做一个帧打包,所以我们要split一下
|
||||||
splitH264(frame->data(), frame->size(), frame->prefixSize(), [&](const char *ptr, int len, int prefix) {
|
splitH264(frame->data(), frame->size(), frame->prefixSize(), [&](const char *ptr, int len, int prefix) {
|
||||||
H264FrameInternal::Ptr sub_frame = std::make_shared<H264FrameInternal>(frame, (char *)ptr, len, prefix);
|
H264FrameInternal::Ptr sub_frame = std::make_shared<H264FrameInternal>(frame, (char *)ptr, len, prefix);
|
||||||
|
Loading…
Reference in New Issue
Block a user