修复ps解析误判为aac的bug

This commit is contained in:
xiongziliang 2020-06-29 11:55:13 +08:00
parent 038979b716
commit bbcb4d41f7

View File

@ -158,6 +158,11 @@ void DecoderImp::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d
}
case PSI_STREAM_AAC: {
uint8_t *ptr = (uint8_t *)data;
if(!(bytes > 7 && ptr[0] == 0xFF && (ptr[1] & 0xF0) == 0xF0)){
//这不是aac
break;
}
if (!_codecid_audio) {
//获取到音频
_codecid_audio = codecid;