mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
在track就绪前,强制split frame,防止sps pps未被获取到
This commit is contained in:
parent
c997d11bd1
commit
cb00dbab0f
@ -148,7 +148,7 @@ bool H264Track::ready() {
|
|||||||
bool H264Track::inputFrame(const Frame::Ptr &frame) {
|
bool H264Track::inputFrame(const Frame::Ptr &frame) {
|
||||||
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
|
using H264FrameInternal = FrameInternal<H264FrameNoCacheAble>;
|
||||||
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
int type = H264_TYPE(frame->data()[frame->prefixSize()]);
|
||||||
if (type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) {
|
if ((type == H264Frame::NAL_B_P || type == H264Frame::NAL_IDR) && ready()) {
|
||||||
return inputFrame_l(frame);
|
return inputFrame_l(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ bool H265Track::ready() {
|
|||||||
|
|
||||||
bool H265Track::inputFrame(const Frame::Ptr &frame) {
|
bool H265Track::inputFrame(const Frame::Ptr &frame) {
|
||||||
int type = H265_TYPE(frame->data()[frame->prefixSize()]);
|
int type = H265_TYPE(frame->data()[frame->prefixSize()]);
|
||||||
if (!frame->configFrame() && type != H265Frame::NAL_SEI_PREFIX) {
|
if (!frame->configFrame() && type != H265Frame::NAL_SEI_PREFIX && ready()) {
|
||||||
return inputFrame_l(frame);
|
return inputFrame_l(frame);
|
||||||
}
|
}
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user