File tree Expand file tree Collapse file tree 4 files changed +26
-1
lines changed
modules/nginx-rtmp-module Expand file tree Collapse file tree 4 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ ngx_http_flv_live_send_header(ngx_http_request_t *r)
131131 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
132132 }
133133
134- switch (hflcf -> audio | (hflcf -> video < 1 )) {
134+ switch (hflcf -> audio | (hflcf -> video << 1 )) {
135135 case 1 : // audio only
136136 b -> start = b -> pos = ngx_flv_live_audio_header ;
137137 b -> end = b -> last = ngx_flv_live_audio_header +
@@ -528,6 +528,7 @@ ngx_http_flv_live_handler(ngx_http_request_t *r)
528528 ngx_rtmp_core_srv_conf_t * cscf ;
529529 ngx_rtmp_core_app_conf_t * * cacfp ;
530530 ngx_http_cleanup_t * cln ;
531+ ngx_rtmp_core_main_conf_t * cmcf ;
531532
532533 rc = ngx_http_discard_request_body (r );
533534
@@ -612,6 +613,13 @@ ngx_http_flv_live_handler(ngx_http_request_t *r)
612613 s -> stage = NGX_LIVE_PLAY ;
613614 s -> ptime = ngx_current_msec ;
614615
616+ cmcf = ngx_rtmp_get_module_main_conf (s , ngx_rtmp_core_module );
617+ s -> variables = ngx_pcalloc (s -> pool , cmcf -> variables .nelts
618+ * sizeof (ngx_http_variable_value_t ));
619+ if (s -> variables == NULL ) {
620+ return NGX_HTTP_INTERNAL_SERVER_ERROR ;
621+ }
622+
615623 if (ngx_rtmp_play_filter (s , & v ) != NGX_OK ) {
616624 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
617625 }
Original file line number Diff line number Diff line change @@ -611,6 +611,7 @@ ngx_hls_http_create_session(ngx_http_request_t *r)
611611 ngx_uint_t n ;
612612 ngx_rtmp_core_srv_conf_t * cscf ;
613613 ngx_rtmp_core_app_conf_t * * cacfp ;
614+ ngx_rtmp_core_main_conf_t * cmcf ;
614615
615616 hlcf = ngx_http_get_module_loc_conf (r , ngx_hls_http_module );
616617
@@ -678,6 +679,13 @@ ngx_hls_http_create_session(ngx_http_request_t *r)
678679 s -> ptime = ngx_current_msec ;
679680// s->connection = r->connection;
680681
682+ cmcf = ngx_rtmp_get_module_main_conf (s , ngx_rtmp_core_module );
683+ s -> variables = ngx_pcalloc (s -> pool , cmcf -> variables .nelts
684+ * sizeof (ngx_http_variable_value_t ));
685+ if (s -> variables == NULL ) {
686+ return NULL ;
687+ }
688+
681689 if (ngx_rtmp_play_filter (s , & v ) != NGX_OK ) {
682690 return NULL ;
683691 }
Original file line number Diff line number Diff line change @@ -433,6 +433,7 @@ ngx_mpegts_http_handler(ngx_http_request_t *r)
433433 ngx_rtmp_core_srv_conf_t * cscf ;
434434 ngx_rtmp_core_app_conf_t * * cacfp ;
435435 ngx_http_cleanup_t * cln ;
436+ ngx_rtmp_core_main_conf_t * cmcf ;
436437
437438 ctx = ngx_pcalloc (r -> pool , sizeof (ngx_mpegts_http_ctx_t ));
438439 if (ctx == NULL ) {
@@ -512,6 +513,13 @@ ngx_mpegts_http_handler(ngx_http_request_t *r)
512513 s -> stage = NGX_LIVE_PLAY ;
513514 s -> ptime = ngx_current_msec ;
514515
516+ cmcf = ngx_rtmp_get_module_main_conf (s , ngx_rtmp_core_module );
517+ s -> variables = ngx_pcalloc (s -> pool , cmcf -> variables .nelts
518+ * sizeof (ngx_http_variable_value_t ));
519+ if (s -> variables == NULL ) {
520+ return NGX_HTTP_INTERNAL_SERVER_ERROR ;
521+ }
522+
515523 if (ngx_rtmp_play_filter (s , & v ) != NGX_OK ) {
516524 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
517525 }
Original file line number Diff line number Diff line change 178178 apt-get install -y libpcre3 libpcre3-dev
179179 apt-get install -y zlib1g-dev
180180 apt-get install -y openssl
181+ apt-get install -y libssl-dev
181182
182183 elif [ " $CMD " == " brew" ]
183184 then
You can’t perform that action at this time.
0 commit comments