提高H264点播兼容性

This commit is contained in:
xiongziliang 2020-04-03 23:03:47 +08:00
parent 42eece5b9a
commit 1ca81e39fe
2 changed files with 4 additions and 4 deletions

View File

@ -257,7 +257,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){ if(type == H264Frame::NAL_SPS || type == H264Frame::NAL_SEI){
//有些设备会把SPS PPS IDR帧当做一个帧打包所以我们要split一下 //有些设备会把SPS PPS IDR帧当做一个帧打包所以我们要split一下
bool first_frame = true; bool first_frame = true;
splitH264(frame->data() + frame->prefixSize(), splitH264(frame->data() + frame->prefixSize(),