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

merge srs2

This commit is contained in:
winlin 2017-01-10 11:17:37 +08:00
commit 1dd877c0d6
5 changed files with 44 additions and 3 deletions

View file

@ -339,7 +339,7 @@ void SrsCodecSample::clear()
cts = 0;
frame_type = SrsCodecVideoAVCFrameReserved;
avc_packet_type = SrsCodecVideoAVCTypeReserved;
has_idr = false;
has_aud = has_sei = has_non_idr = has_idr = false;
first_nalu_type = SrsAvcNaluTypeReserved;
acodec = SrsCodecAudioReserved1;
@ -370,6 +370,12 @@ int SrsCodecSample::add_sample_unit(char* bytes, int size)
if (nal_unit_type == SrsAvcNaluTypeIDR) {
has_idr = true;
} else if (nal_unit_type == SrsAvcNaluTypeNonIDR) {
has_non_idr = true;
} else if (nal_unit_type == SrsAvcNaluTypeSEI) {
has_sei = true;
} else if (nal_unit_type == SrsAvcNaluTypeAccessUnitDelimiter) {
has_aud = true;
}
if (first_nalu_type == SrsAvcNaluTypeReserved) {