|
|
@ -1067,6 +1067,15 @@ int SrsSource::on_audio(SrsMessage* __audio)
|
|
|
|
|
|
|
|
|
|
|
|
// ignore.
|
|
|
|
// ignore.
|
|
|
|
ret = ERROR_SUCCESS;
|
|
|
|
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 {
|
|
|
|
} else {
|
|
|
|
srs_warn("hls disconnect publisher for audio error. ret=%d", ret);
|
|
|
|
srs_warn("hls disconnect publisher for audio error. ret=%d", ret);
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
@ -1184,6 +1193,15 @@ int SrsSource::on_video(SrsMessage* __video)
|
|
|
|
|
|
|
|
|
|
|
|
// ignore.
|
|
|
|
// ignore.
|
|
|
|
ret = ERROR_SUCCESS;
|
|
|
|
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 {
|
|
|
|
} else {
|
|
|
|
srs_warn("hls disconnect publisher for video error. ret=%d", ret);
|
|
|
|
srs_warn("hls disconnect publisher for video error. ret=%d", ret);
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|