mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Remove unreachable issues in code (#3793)
remove unreachable links by python scripts:
```
def is_delete_issue(link):
try:
response = requests.get(link)
except RequestException as e:
print(f"An error occurred while trying to get the link: {e}")
return False
return "This issue has been deleted." in response.text
def remove_unreachable_links(dir):
string_to_search = re.compile(r'// @see https://github\.com/ossrs/srs/issues/.*')
file_list = util.find_files_with_extension(dir, ".cpp", True)
for file in file_list:
lines = []
with open(file, "r", encoding="utf-8") as f:
lines = f.readlines()
with open(file, "w", encoding="utf-8", newline="\n") as f:
for line in lines:
if string_to_search.search(line):
result = re.search(r'https://github\.com/ossrs/srs/issues/\d+', line)
if result:
link = result.group()
if is_delete_issue(link):
print("is_delete_issue link: file: %s, line: %s" % (file, line))
continue
f.write(line)
if __name__ == "__main__":
remove_unreachable_links("srs/trunk/src/")
```
This commit is contained in:
parent
7138edd318
commit
6e6b80d837
13 changed files with 0 additions and 22 deletions
|
|
@ -868,7 +868,6 @@ srs_error_t SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg)
|
|||
}
|
||||
|
||||
// when wait keyframe, ignore if no frame arrived.
|
||||
// @see https://github.com/ossrs/srs/issues/177
|
||||
if (wait_keyframe) {
|
||||
if (!msg->is_video()) {
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -201,7 +201,6 @@ srs_error_t SrsEdgeFlvUpstream::do_connect(SrsRequest* r, SrsLbRoundRobin* lb, i
|
|||
if (redirect_depth == 0) {
|
||||
SrsConfDirective* conf = _srs_config->get_vhost_edge_origin(req->vhost);
|
||||
|
||||
// @see https://github.com/ossrs/srs/issues/79
|
||||
// when origin is error, for instance, server is shutdown,
|
||||
// then user remove the vhost then reload, the conf is empty.
|
||||
if (!conf) {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ srs_error_t SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
|
|||
|
||||
// for not rtmp input, donot append the iformat,
|
||||
// for example, "-f flv" before "-i udp://192.168.1.252:2222"
|
||||
// @see https://github.com/ossrs/srs/issues/290
|
||||
if (!srs_string_starts_with(input, "rtmp://")) {
|
||||
iformat = "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -554,7 +554,6 @@ bool SrsHlsMuxer::wait_keyframe()
|
|||
|
||||
bool SrsHlsMuxer::is_segment_absolutely_overflow()
|
||||
{
|
||||
// @see https://github.com/ossrs/srs/issues/151#issuecomment-83553950
|
||||
srs_assert(current);
|
||||
|
||||
// to prevent very small segment.
|
||||
|
|
@ -812,7 +811,6 @@ srs_error_t SrsHlsMuxer::_refresh_m3u8(string m3u8_file)
|
|||
* rounded to the nearest integer. Its value MUST NOT change. A
|
||||
* typical target duration is 10 seconds.
|
||||
*/
|
||||
// @see https://github.com/ossrs/srs/issues/304#issuecomment-74000081
|
||||
srs_utime_t max_duration = segments->max_duration();
|
||||
int target_duration = (int)ceil(srsu2msi(srs_max(max_duration, max_td)) / 1000.0);
|
||||
|
||||
|
|
@ -1025,9 +1023,7 @@ srs_error_t SrsHlsController::write_audio(SrsAudioFrame* frame, int64_t pts)
|
|||
// for example, pure audio when start, audio/video when publishing,
|
||||
// pure audio again for audio disabled.
|
||||
// so we reap event when the audio incoming when segment overflow.
|
||||
// @see https://github.com/ossrs/srs/issues/151
|
||||
// we use absolutely overflow of segment to make jwplayer/ffplay happy
|
||||
// @see https://github.com/ossrs/srs/issues/151#issuecomment-71155184
|
||||
if (tsmc->audio && muxer->is_segment_absolutely_overflow()) {
|
||||
if ((err = reap_segment()) != srs_success) {
|
||||
return srs_error_wrap(err, "hls: reap segment");
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ private:
|
|||
// The video frames we got.
|
||||
uint64_t video_frames;
|
||||
// For mr(merged read),
|
||||
// @see https://github.com/ossrs/srs/issues/241
|
||||
bool mr;
|
||||
int mr_fd;
|
||||
srs_utime_t mr_sleep;
|
||||
|
|
@ -149,7 +148,6 @@ private:
|
|||
// The params for conn callback.
|
||||
SrsLiveSource* _source;
|
||||
// The error timeout cond
|
||||
// @see https://github.com/ossrs/srs/issues/244
|
||||
srs_cond_t error;
|
||||
// The merged context id.
|
||||
SrsContextId cid;
|
||||
|
|
|
|||
|
|
@ -1020,7 +1020,6 @@ srs_error_t SrsRtmpConn::do_publishing(SrsLiveSource* source, SrsPublishRecvThre
|
|||
// cond wait for timeout.
|
||||
if (nb_msgs == 0) {
|
||||
// when not got msgs, wait for a larger timeout.
|
||||
// @see https://github.com/ossrs/srs/issues/441
|
||||
rtrd->wait(publish_1stpkt_timeout);
|
||||
} else {
|
||||
rtrd->wait(publish_normal_timeout);
|
||||
|
|
|
|||
|
|
@ -967,7 +967,6 @@ srs_error_t SrsOriginHub::on_audio(SrsSharedPtrMessage* shared_audio)
|
|||
|
||||
if ((err = hls->on_audio(msg, format)) != srs_success) {
|
||||
// apply the error strategy for hls.
|
||||
// @see https://github.com/ossrs/srs/issues/264
|
||||
std::string hls_error_strategy = _srs_config->get_hls_on_error(req_->vhost);
|
||||
if (srs_config_hls_is_on_error_ignore(hls_error_strategy)) {
|
||||
srs_warn("hls: ignore audio error %s", srs_error_desc(err).c_str());
|
||||
|
|
@ -1061,7 +1060,6 @@ srs_error_t SrsOriginHub::on_video(SrsSharedPtrMessage* shared_video, bool is_se
|
|||
if ((err = hls->on_video(msg, format)) != srs_success) {
|
||||
// TODO: We should support more strategies.
|
||||
// apply the error strategy for hls.
|
||||
// @see https://github.com/ossrs/srs/issues/264
|
||||
std::string hls_error_strategy = _srs_config->get_hls_on_error(req_->vhost);
|
||||
if (srs_config_hls_is_on_error_ignore(hls_error_strategy)) {
|
||||
srs_warn("hls: ignore video error %s", srs_error_desc(err).c_str());
|
||||
|
|
@ -1629,7 +1627,6 @@ srs_error_t SrsMetaCache::dumps(SrsLiveConsumer* consumer, bool atc, SrsRtmpJitt
|
|||
|
||||
// copy sequence header
|
||||
// copy audio sequence first, for hls to fast parse the "right" audio codec.
|
||||
// @see https://github.com/ossrs/srs/issues/301
|
||||
if (aformat && aformat->acodec && aformat->acodec->id != SrsAudioCodecIdMP3) {
|
||||
if (ds && audio && (err = consumer->enqueue(audio, atc, ag)) != srs_success) {
|
||||
return srs_error_wrap(err, "enqueue audio sh");
|
||||
|
|
@ -1858,7 +1855,6 @@ srs_error_t SrsLiveSourceManager::notify(int event, srs_utime_t interval, srs_ut
|
|||
|
||||
// TODO: FIXME: support source cleanup.
|
||||
// @see https://github.com/ossrs/srs/issues/713
|
||||
// @see https://github.com/ossrs/srs/issues/714
|
||||
#if 0
|
||||
// When source expired, remove it.
|
||||
if (source->stream_is_dead()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue