1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

SquashSRS4: Fix republish bug

This commit is contained in:
winlin 2021-04-04 19:05:44 +08:00
parent 52644f50c9
commit fcf72b48f9

View file

@ -482,11 +482,6 @@ srs_error_t SrsRtcStream::on_publish()
is_created_ = true; is_created_ = true;
is_delivering_packets_ = true; is_delivering_packets_ = true;
// Notify the consumers about stream change event.
if ((err = on_source_changed()) != srs_success) {
return srs_error_wrap(err, "source id change");
}
// Create a new bridger, because it's been disposed when unpublish. // Create a new bridger, because it's been disposed when unpublish.
#ifdef SRS_FFMPEG_FIT #ifdef SRS_FFMPEG_FIT
SrsRtcFromRtmpBridger* impl = new SrsRtcFromRtmpBridger(this); SrsRtcFromRtmpBridger* impl = new SrsRtcFromRtmpBridger(this);
@ -497,6 +492,11 @@ srs_error_t SrsRtcStream::on_publish()
bridger_->setup(impl); bridger_->setup(impl);
#endif #endif
// Notify the consumers about stream change event.
if ((err = on_source_changed()) != srs_success) {
return srs_error_wrap(err, "source id change");
}
// TODO: FIXME: Handle by statistic. // TODO: FIXME: Handle by statistic.
return err; return err;