mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SRT: fix crash when srt_to_rtmp off (#3386)
* SRT: fix crash when srt_to_rtmp off * Release v5.0.136 v6.0.17 Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
02653ce2aa
commit
c5ccee1edf
4 changed files with 9 additions and 5 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,9 @@ void SrsSrtSource::on_unpublish()
|
|||
|
||||
can_publish_ = true;
|
||||
|
||||
bridge_->on_unpublish();
|
||||
if (bridge_) {
|
||||
bridge_->on_unpublish();
|
||||
}
|
||||
srs_freep(bridge_);
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 135
|
||||
#define VERSION_REVISION 136
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 16
|
||||
#define VERSION_REVISION 17
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue