mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-19 01:31:09 +02:00
Merge pull request #116 from heftig/master
dash: Ensure directory exists before opening fragments
This commit is contained in:
commit
5376bd3432
|
@ -20,6 +20,7 @@ static void * ngx_rtmp_dash_create_app_conf(ngx_conf_t *cf);
|
|||
static char * ngx_rtmp_dash_merge_app_conf(ngx_conf_t *cf,
|
||||
void *parent, void *child);
|
||||
static ngx_int_t ngx_rtmp_dash_write_init_segments(ngx_rtmp_session_t *s);
|
||||
static ngx_int_t ngx_rtmp_dash_ensure_directory(ngx_rtmp_session_t *s);
|
||||
|
||||
|
||||
#define NGX_RTMP_DASH_BUFSIZE (1024*1024)
|
||||
|
@ -773,6 +774,10 @@ ngx_rtmp_dash_open_fragments(ngx_rtmp_session_t *s)
|
|||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (ngx_rtmp_dash_ensure_directory(s) != NGX_OK) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_rtmp_dash_open_fragment(s, &ctx->video, ctx->id, 'v');
|
||||
|
||||
ngx_rtmp_dash_open_fragment(s, &ctx->audio, ctx->id, 'a');
|
||||
|
|
Loading…
Reference in a new issue