Revert "Intellegent variant playlist entries. Auto stream inf, skip if not live"

This reverts commit 7b7d30f36c.

Conflicts:
	hls/ngx_rtmp_hls_module.c
This commit is contained in:
root 2020-12-30 04:01:12 +00:00
parent 6c4be06423
commit 59c2454b23

View file

@ -9,11 +9,9 @@
#include <ngx_rtmp.h>
#include <ngx_rtmp_cmd_module.h>
#include <ngx_rtmp_codec_module.h>
#include <ngx_rtmp_live_module.h>
#include "ngx_rtmp_mpegts.h"
static ngx_rtmp_publish_pt next_publish;
static ngx_rtmp_close_stream_pt next_close_stream;
static ngx_rtmp_stream_begin_pt next_stream_begin;
@ -298,7 +296,7 @@ static ngx_command_t ngx_rtmp_hls_commands[] = {
ngx_conf_set_enum_slot,
NGX_RTMP_APP_CONF_OFFSET,
offsetof(ngx_rtmp_hls_app_conf_t, allow_client_cache),
&ngx_rtmp_hls_cache },
&ngx_rtmp_hls_cache },
{ ngx_string("hls_variant"),
NGX_RTMP_MAIN_CONF|NGX_RTMP_SRV_CONF|NGX_RTMP_APP_CONF|NGX_CONF_1MORE,
@ -383,6 +381,7 @@ ngx_module_t ngx_rtmp_hls_module = {
NGX_MODULE_V1_PADDING
};
<<<<<<< HEAD
static ngx_rtmp_codec_ctx_t * ngx_rtmp_hls_get_stream(ngx_rtmp_session_t *s, u_char *name)
{
ngx_rtmp_core_app_conf_t *cacf;
@ -408,6 +407,8 @@ static ngx_rtmp_codec_ctx_t * ngx_rtmp_hls_get_stream(ngx_rtmp_session_t *s, u_c
return NULL;
}
=======
>>>>>>> parent of 7b7d30f... Intellegent variant playlist entries. Auto stream inf, skip if not live
static ngx_rtmp_hls_frag_t *
ngx_rtmp_hls_get_frag(ngx_rtmp_session_t *s, ngx_int_t n)
@ -458,8 +459,6 @@ ngx_rtmp_hls_write_variant_playlist(ngx_rtmp_session_t *s)
static u_char buffer[1024];
u_char *p, *last;
u_char variant_name[NGX_RTMP_MAX_NAME];
ssize_t rc;
ngx_fd_t fd;
ngx_str_t *arg;
@ -467,8 +466,6 @@ ngx_rtmp_hls_write_variant_playlist(ngx_rtmp_session_t *s)
ngx_rtmp_hls_ctx_t *ctx;
ngx_rtmp_hls_variant_t *var;
ngx_rtmp_hls_app_conf_t *hacf;
ngx_rtmp_codec_ctx_t *codec_ctx;
double total_data_rate;
ngx_rtmp_playlist_t v;
@ -506,6 +503,7 @@ ngx_rtmp_hls_write_variant_playlist(ngx_rtmp_session_t *s)
p = ngx_slprintf(p, last, "#EXT-X-STREAM-INF:PROGRAM-ID=1,CLOSED-CAPTIONS=NONE");
<<<<<<< HEAD
// not sure why this is necessary. snprintf wasn't null terminating
ngx_memzero(variant_name, NGX_RTMP_MAX_NAME);
@ -549,6 +547,11 @@ ngx_rtmp_hls_write_variant_playlist(ngx_rtmp_session_t *s)
for (k = 0; k < var->args.nelts; k++, arg++) {
p = ngx_slprintf(p, last, ",%V", arg);
}
=======
arg = var->args.elts;
for (k = 0; k < var->args.nelts; k++, arg++) {
p = ngx_slprintf(p, last, ",%V", arg);
>>>>>>> parent of 7b7d30f... Intellegent variant playlist entries. Auto stream inf, skip if not live
}
if (p < last) {