Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRT: fix crash when srt_to_rtmp off #3386

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The changelog for SRS.

## SRS 6.0 Changelog

* v6.0, 2023-01-18, Merge [#3386](https://github.com/ossrs/srs/pull/3386): SRT: fix crash when srt_to_rtmp off. v6.0.17 (#3386)
* v5.0, 2023-01-17, Merge [#3385](https://github.com/ossrs/srs/pull/3385): API: Support server/pid/service label for exporter and api. v6.0.16 (#3385)
* v6.0, 2023-01-17, Merge [#3379](https://github.com/ossrs/srs/pull/3379): H265: Support demux vps/pps info. v6.0.15
* v6.0, 2023-01-08, Merge [#3360](https://github.com/ossrs/srs/pull/3360): H265: Support DVR HEVC stream to MP4. v6.0.14
Expand All @@ -30,6 +31,7 @@ The changelog for SRS.

## SRS 5.0 Changelog

* v5.0, 2023-01-18, Merge [#3386](https://github.com/ossrs/srs/pull/3386): SRT: fix crash when srt_to_rtmp off. v5.0.136 (#3386)
* v5.0, 2023-01-17, Merge [#3385](https://github.com/ossrs/srs/pull/3385): API: Support server/pid/service label for exporter and api. v5.0.135 (#3385)
* v5.0, 2023-01-17, Merge [#3383](https://github.com/ossrs/srs/pull/3383): GB: Fix PSM parsing indicator bug. v5.0.134 (#3383)
* v5.0, 2023-01-08, Merge [#3308](https://github.com/ossrs/srs/pull/3308): DVR: Improve file write performance by fwrite with cache. v5.0.133
Expand Down
8 changes: 5 additions & 3 deletions trunk/src/app/srs_app_srt_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ srs_error_t SrsSrtSource::on_publish()
return srs_error_wrap(err, "source id change");
}

if ((err = bridge_->on_publish()) != srs_success) {
if (bridge_ && (err = bridge_->on_publish()) != srs_success) {
return srs_error_wrap(err, "bridge on publish");
}

Expand All @@ -787,7 +787,9 @@ void SrsSrtSource::on_unpublish()

can_publish_ = true;

bridge_->on_unpublish();
if (bridge_) {
bridge_->on_unpublish();
}
srs_freep(bridge_);
winlinvip marked this conversation as resolved.
Show resolved Hide resolved
}

Expand All @@ -802,7 +804,7 @@ srs_error_t SrsSrtSource::on_packet(SrsSrtPacket* packet)
}
}

if ((err = bridge_->on_packet(packet)) != srs_success) {
if (bridge_ && (err = bridge_->on_packet(packet)) != srs_success) {
return srs_error_wrap(err, "bridge consume message");
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 135
#define VERSION_REVISION 136

#endif
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version6.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 16
#define VERSION_REVISION 17

#endif