1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #307, #1070, define FLV CodecID for AV1 and Opus. 3.0.101

This commit is contained in:
winlin 2020-01-19 11:22:35 +08:00
parent bdd0b1f7a2
commit 3900179685
7 changed files with 22 additions and 4 deletions

View file

@ -43,6 +43,8 @@ string srs_video_codec_id2str(SrsVideoCodecId codec)
return "VP6";
case SrsVideoCodecIdHEVC:
return "HEVC";
case SrsVideoCodecIdAV1:
return "AV1";
case SrsVideoCodecIdReserved:
case SrsVideoCodecIdReserved1:
case SrsVideoCodecIdReserved2:
@ -650,7 +652,10 @@ bool SrsFormat::is_aac_sequence_header()
bool SrsFormat::is_avc_sequence_header()
{
return vcodec && (vcodec->id == SrsVideoCodecIdAVC || vcodec->id == SrsVideoCodecIdHEVC)
bool h264 = vcodec->id == SrsVideoCodecIdAVC;
bool h265 = vcodec->id == SrsVideoCodecIdHEVC;
bool av1 = vcodec->id == SrsVideoCodecIdAV1;
return vcodec && (h264 || h265 || av1)
&& video && video->avc_packet_type == SrsVideoAvcFrameTraitSequenceHeader;
}