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

for #179, refine dvr, support POST create dvr when publish not start. 2.0.126

This commit is contained in:
winlin 2015-02-27 20:39:36 +08:00
parent b903a7b436
commit 0213cc6466
11 changed files with 265 additions and 174 deletions

View file

@ -392,9 +392,11 @@ int SrsRtmpConn::stream_service_cycle()
bool vhost_is_edge = _srs_config->get_vhost_is_edge(req->vhost);
// find a source to serve.
SrsSource* source = NULL;
if ((ret = SrsSource::find(req, server, server, &source)) != ERROR_SUCCESS) {
return ret;
SrsSource* source = SrsSource::fetch(req);
if (!source) {
if ((ret = SrsSource::create(req, server, server, &source)) != ERROR_SUCCESS) {
return ret;
}
}
srs_assert(source != NULL);