mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 20:15:58 +08:00
新增媒体流flush机制:#1996
This commit is contained in:
@@ -65,6 +65,10 @@ DecoderImp::Ptr DecoderImp::createDecoder(Type type, MediaSinkInterface *sink){
|
||||
return DecoderImp::Ptr(new DecoderImp(decoder, sink));
|
||||
}
|
||||
|
||||
void DecoderImp::flush() {
|
||||
_merger.flush();
|
||||
}
|
||||
|
||||
ssize_t DecoderImp::input(const uint8_t *data, size_t bytes){
|
||||
return _decoder->input(data, bytes);
|
||||
}
|
||||
@@ -219,10 +223,7 @@ void DecoderImp::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d
|
||||
default:
|
||||
// 海康的 PS 流中会有 codecid 为 0xBD 的包
|
||||
if (codecid != 0 && codecid != 0xBD) {
|
||||
if (_last_unsported_print.elapsedTime() / 1000 > 5) {
|
||||
_last_unsported_print.resetTime();
|
||||
WarnL << "unsupported codec type:" << getCodecName(codecid) << " " << (int) codecid;
|
||||
}
|
||||
WarnL << "unsupported codec type:" << getCodecName(codecid) << " " << (int) codecid;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user