修复一个关闭GB28181时引发的崩溃问题 (#3118)

fix #3116 #3115
This commit is contained in:
waken
2023-12-13 17:41:57 +08:00
committed by GitHub
parent 2f4cd67162
commit 9933398614
3 changed files with 8 additions and 1 deletions

View File

@@ -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);