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

merge from 2.0

This commit is contained in:
winlin 2016-08-10 22:05:21 +08:00
commit 14760003ba
4 changed files with 87 additions and 15 deletions

View file

@ -113,8 +113,16 @@ int main(int argc, char** argv)
srs_human_trace("duration and timeout must be positive.");
exit(-3);
}
rtmp = srs_rtmp_create(rtmp_url);
if ((rtmp = srs_rtmp_create(rtmp_url)) == NULL) {
srs_human_trace("create rtmp failed");
ret = -1;
goto rtmp_destroy;
}
if ((ret = srs_rtmp_set_timeout(rtmp, timeout * 1000, timeout * 1000)) != 0) {
srs_human_trace("set timeout for rtmp failed. errno=%d", ret);
goto rtmp_destroy;
}
if ((ret = srs_rtmp_dns_resolve(rtmp)) != 0) {
srs_human_trace("dns resolve failed. ret=%d", ret);