Skip to content

Commit

Permalink
SRT: use default streamid when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhihong committed Oct 8, 2022
1 parent c12dede commit 77d9120
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trunk/src/app/srs_app_srt_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ srs_error_t SrsMpegtsSrtConn::do_cycle()
return srs_error_wrap(err, "get srt streamid");
}

// Must have streamid, because srt ts packet will convert to rtmp or rtc.
// If streamid empty, using default streamid instead.
if (streamid.empty()) {
return srs_error_new(ERROR_SRT_CONN, "empty srt streamid");
streamid = "#!::r=live/livestream,m=publish";
srs_warn("srt get empty streamid, using default steramid %s instead", streamid.c_str());
}

// Detect streamid of srt to request.
Expand Down

0 comments on commit 77d9120

Please sign in to comment.