From: Jaroslav Kysela Date: Sat, 15 Mar 2014 17:56:48 +0000 (+0100) Subject: Fix the unitialized variable for the cache scheme (HTTP streaming) X-Git-Tag: v4.1~2226^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F347%2Fhead;p=thirdparty%2Ftvheadend.git Fix the unitialized variable for the cache scheme (HTTP streaming) --- diff --git a/src/muxer.c b/src/muxer.c index 2d7373275..a07e02cfa 100644 --- a/src/muxer.c +++ b/src/muxer.c @@ -251,11 +251,12 @@ muxer_create(muxer_container_type_t mc, muxer_config_t *m_cfg) m = lav_muxer_create(mc, m_cfg); #endif - if(!m) + if(!m) { tvhlog(LOG_ERR, "mux", "Can't find a muxer that supports '%s' container", muxer_container_type2txt(mc)); - else - m->m_cache = m_cfg->dvr_cache; + return NULL; + } + m->m_cache = m_cfg ? m_cfg->dvr_cache : MC_CACHE_SYSTEM; return m; } diff --git a/src/webui/webui.c b/src/webui/webui.c index ca5f5f521..6fc7d658f 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -787,6 +787,7 @@ http_stream_channel(http_connection_t *hc, channel_t *ch, int weight) mc = cfg->dvr_mc; } m_cfg.dvr_flags = cfg->dvr_mux_flags; + m_cfg.dvr_cache = cfg->dvr_mux_cache; if ((str = http_arg_get(&hc->hc_req_args, "qsize"))) qsize = atoll(str);