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

Merge branch '2.0release' into develop

This commit is contained in:
winlin 2015-06-06 21:42:12 +08:00
commit 17d6016bf6
3 changed files with 15 additions and 3 deletions

View file

@ -869,7 +869,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
pprint->elapse();
// cond wait for error.
trd->wait(SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 1000);
trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000);
// check the thread error code.
if ((ret = trd->error_code()) != ERROR_SUCCESS) {

View file

@ -1479,7 +1479,11 @@ int SrsSource::on_audio(SrsCommonMessage* shared_audio)
}
// consume the monotonically increase message.
if (m->is_audio()) {
ret = on_audio_imp(m);
} else {
ret = on_video_imp(m);
}
srs_freep(m);
return ret;
@ -1670,7 +1674,11 @@ int SrsSource::on_video(SrsCommonMessage* shared_video)
SrsAutoFree(SrsSharedPtrMessage, m);
// consume the monotonically increase message.
if (m->is_audio()) {
ret = on_audio_imp(m);
} else {
ret = on_video_imp(m);
}
srs_freep(m);
return ret;

View file

@ -74,6 +74,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// the timeout to wait client data,
// if timeout, close the connection.
#define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
// the timeout for publish recv.
// we must use more smaller timeout, for the recv never know the status
// of underlayer socket.
#define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL)
// the timeout to wait for client control message,
// if timeout, we generally ignore and send the data to client,