Commit 0808cdee by xiongziliang

修复rtmp解复用器可能丢失config帧的bug

parent db261260
......@@ -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:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论