mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-01 06:09:32 +02:00
fixed crash in delete_stream
This commit is contained in:
parent
cba4ecc560
commit
43ceafc186
|
@ -9,7 +9,5 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
|
|||
$ngx_addon_dir/ngx_rtmp_hls_module.c \
|
||||
"
|
||||
|
||||
CORE_LIBS="$CORE_LIBS /home/rarutyunyan/root/lib/libavcodec.so /home/rarutyunyan/root/lib/libavformat.so"
|
||||
|
||||
CFLAGS="$CFLAGS -I/home/rarutyunyan/root/include"
|
||||
CORE_LIBS="$CORE_LIBS -lavformat"
|
||||
|
||||
|
|
|
@ -785,7 +785,7 @@ ngx_rtmp_hls_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t *v)
|
|||
hacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_hls_module);
|
||||
ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_hls_module);
|
||||
if (hacf == NULL || !hacf->hls || ctx == NULL
|
||||
|| (ctx->flags & NGX_RTMP_HLS_PUBLISHING) == 0)
|
||||
|| (ctx->flags & NGX_RTMP_HLS_PUBLISHING) == 0)
|
||||
{
|
||||
goto next;
|
||||
}
|
||||
|
@ -798,6 +798,10 @@ ngx_rtmp_hls_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t *v)
|
|||
ngx_del_timer(&ctx->restart_evt);
|
||||
}
|
||||
|
||||
if (ctx->out_format == NULL) {
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (av_write_trailer(ctx->out_format) < 0) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
|
||||
"hls: av_write_trailer failed");
|
||||
|
|
Loading…
Reference in a new issue