mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix codec check
This commit is contained in:
parent
3900179685
commit
9ac8585cf9
1 changed files with 3 additions and 3 deletions
|
@ -652,9 +652,9 @@ bool SrsFormat::is_aac_sequence_header()
|
||||||
|
|
||||||
bool SrsFormat::is_avc_sequence_header()
|
bool SrsFormat::is_avc_sequence_header()
|
||||||
{
|
{
|
||||||
bool h264 = vcodec->id == SrsVideoCodecIdAVC;
|
bool h264 = (vcodec && vcodec->id == SrsVideoCodecIdAVC);
|
||||||
bool h265 = vcodec->id == SrsVideoCodecIdHEVC;
|
bool h265 = (vcodec && vcodec->id == SrsVideoCodecIdHEVC);
|
||||||
bool av1 = vcodec->id == SrsVideoCodecIdAV1;
|
bool av1 = (vcodec && vcodec->id == SrsVideoCodecIdAV1);
|
||||||
return vcodec && (h264 || h265 || av1)
|
return vcodec && (h264 || h265 || av1)
|
||||||
&& video && video->avc_packet_type == SrsVideoAvcFrameTraitSequenceHeader;
|
&& video && video->avc_packet_type == SrsVideoAvcFrameTraitSequenceHeader;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue