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

fix #635, hls support NonIDR(open gop). 2.0.226

This commit is contained in:
winlin 2017-01-10 11:14:20 +08:00
parent ba1c92a7b1
commit c9a71b7fb2
6 changed files with 45 additions and 4 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) {