1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for bug #257, support NULL msg in msgs to send.

This commit is contained in:
winlin 2014-12-13 11:22:40 +08:00
parent 66fd4bbf31
commit 5529813fcb
4 changed files with 15 additions and 10 deletions

View file

@ -688,14 +688,12 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
}
// sendout messages, all messages are freed by send_and_free_messages().
if (count > 0) {
// no need to assert msg, for the rtmp will assert it.
if ((ret = rtmp->send_and_free_messages(msgs.msgs, count, res->stream_id)) != ERROR_SUCCESS) {
if (!srs_is_client_gracefully_close(ret)) {
srs_error("send messages to client failed. ret=%d", ret);
}
return ret;
// no need to assert msg, for the rtmp will assert it.
if (count > 0 && (ret = rtmp->send_and_free_messages(msgs.msgs, count, res->stream_id)) != ERROR_SUCCESS) {
if (!srs_is_client_gracefully_close(ret)) {
srs_error("send messages to client failed. ret=%d", ret);
}
return ret;
}
// if duration specified, and exceed it, stop play live.