优化与完善rtmp协议相关代码

rtmp相关常量由宏改为枚举
明确rtmp包一些字段赋值含义
This commit is contained in:
xia-chu
2023-07-22 18:54:59 +08:00
parent 47add54465
commit a86398b6db
7 changed files with 232 additions and 233 deletions

View File

@@ -132,7 +132,7 @@ void RtmpDemuxer::inputRtmp(const RtmpPacket::Ptr &pkt) {
case MSG_AUDIO: {
if (!_try_get_audio_track) {
_try_get_audio_track = true;
auto codec = AMFValue(pkt->getMediaType());
auto codec = AMFValue(pkt->getRtmpCodecId());
makeAudioTrack(codec, pkt->getAudioSampleRate(), pkt->getAudioChannel(), pkt->getAudioSampleBit(), 0);
}
if (_audio_rtmp_decoder) {