mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复rtmp解复用器可能丢失config帧的bug
This commit is contained in:
parent
db261260ff
commit
0808cdee4b
@ -52,27 +52,27 @@ int RtmpDemuxer::getTrackCount(const AMFValue &metedata) {
|
||||
bool RtmpDemuxer::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
||||
switch (pkt->typeId) {
|
||||
case MSG_VIDEO: {
|
||||
if(_videoRtmpDecoder){
|
||||
return _videoRtmpDecoder->inputRtmp(pkt, true);
|
||||
}
|
||||
if(!_tryedGetVideoTrack){
|
||||
_tryedGetVideoTrack = true;
|
||||
auto codec = AMFValue(pkt->getMediaType());
|
||||
makeVideoTrack(codec);
|
||||
}
|
||||
if(_videoRtmpDecoder){
|
||||
return _videoRtmpDecoder->inputRtmp(pkt, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
case MSG_AUDIO: {
|
||||
if(_audioRtmpDecoder){
|
||||
_audioRtmpDecoder->inputRtmp(pkt, false);
|
||||
return false;
|
||||
}
|
||||
if(!_tryedGetAudioTrack) {
|
||||
_tryedGetAudioTrack = true;
|
||||
auto codec = AMFValue(pkt->getMediaType());
|
||||
makeAudioTrack(codec);
|
||||
}
|
||||
if(_audioRtmpDecoder){
|
||||
_audioRtmpDecoder->inputRtmp(pkt, false);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user