修改ref.first判断位置
This commit is contained in:
parent
b4a1997c63
commit
2a91a87255
|
|
@ -110,16 +110,18 @@ 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);
|
||||
return;
|
||||
}
|
||||
if(ref.first){
|
||||
ref.second.inputFrame(frame, [&](uint64_t dts, uint64_t pts, const Buffer::Ptr &buffer, bool) {
|
||||
onFrame(stream, Factory::getFrameFromBuffer(codec, buffer, dts, pts));
|
||||
});
|
||||
}
|
||||
}
|
||||
#else
|
||||
void DecoderImp::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t dts,const void *data,size_t bytes) {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue