推流失败时打印日志

This commit is contained in:
ziyue 2021-06-17 11:34:24 +08:00
parent 60a2346819
commit f8467f21fb
2 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,7 @@ void RtmpPusher::teardown() {
} }
void RtmpPusher::onPublishResult(const SockException &ex, bool handshake_done) { void RtmpPusher::onPublishResult(const SockException &ex, bool handshake_done) {
DebugL << ex.what();
if (ex.getErrCode() == Err_shutdown) { if (ex.getErrCode() == Err_shutdown) {
//主动shutdown的不触发回调 //主动shutdown的不触发回调
return; return;

View File

@ -95,6 +95,7 @@ void RtspPusher::publish(const string &url_str) {
} }
void RtspPusher::onPublishResult(const SockException &ex, bool handshake_done) { void RtspPusher::onPublishResult(const SockException &ex, bool handshake_done) {
DebugL << ex.what();
if (ex.getErrCode() == Err_shutdown) { if (ex.getErrCode() == Err_shutdown) {
//主动shutdown的不触发回调 //主动shutdown的不触发回调
return; return;