mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
merge from 1.0release for #264, ignore the video NALU which is actually a sequence header to make HLS happy. 2.0.75
This commit is contained in:
commit
28eedfc177
4 changed files with 21 additions and 1 deletions
|
@ -1251,6 +1251,15 @@ int SrsSource::on_audio(SrsCommonMessage* __audio)
|
|||
|
||||
// ignore.
|
||||
ret = ERROR_SUCCESS;
|
||||
} else if (hls_error_strategy == SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE) {
|
||||
// compare the sequence header with audio, continue when it's actually an sequence header.
|
||||
if (ret == ERROR_HLS_DECODE_ERROR && cache_sh_audio && cache_sh_audio->size == msg.size) {
|
||||
srs_warn("the audio is actually a sequence header, ignore this packet.");
|
||||
ret = ERROR_SUCCESS;
|
||||
} else {
|
||||
srs_warn("hls continue audio failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
srs_warn("hls disconnect publisher for audio error. ret=%d", ret);
|
||||
return ret;
|
||||
|
@ -1369,6 +1378,15 @@ int SrsSource::on_video(SrsCommonMessage* __video)
|
|||
|
||||
// ignore.
|
||||
ret = ERROR_SUCCESS;
|
||||
} else if (hls_error_strategy == SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE) {
|
||||
// compare the sequence header with video, continue when it's actually an sequence header.
|
||||
if (ret == ERROR_HLS_DECODE_ERROR && cache_sh_video && cache_sh_video->size == msg.size) {
|
||||
srs_warn("the video is actually a sequence header, ignore this packet.");
|
||||
ret = ERROR_SUCCESS;
|
||||
} else {
|
||||
srs_warn("hls continue video failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
srs_warn("hls disconnect publisher for video error. ret=%d", ret);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue