Revert "core: remove pointless re-initialisation of `stream_t` attributes"

This reverts commit b10f5a02e1.

as requested in follow-up discussion in !1104.
This commit is contained in:
Lyndon Brown 2022-01-10 13:35:17 +00:00 committed by Hugo Beauzée-Luyssen
parent a7d0549cd2
commit f6dad0e9f1
3 changed files with 17 additions and 2 deletions

View File

@ -103,7 +103,9 @@ static stream_t *access_New(vlc_object_t *parent, input_thread_t *input,
access->p_input_item = input ? input_GetItem(input) : NULL;
access->out = out;
access->psz_name = NULL;
access->psz_url = strdup(mrl);
access->psz_filepath = NULL;
access->b_preparsing = preparsing;
priv = vlc_stream_Private(access);

View File

@ -156,6 +156,11 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_input,
p_demux->out = out;
p_demux->b_preparsing = b_preparsing;
p_demux->pf_readdir = NULL;
p_demux->pf_demux = NULL;
p_demux->pf_control = NULL;
p_demux->p_sys = NULL;
char *modbuf = NULL;
bool strict = true;
@ -449,9 +454,16 @@ static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
if (unlikely(p_demux == NULL))
return NULL;
p_demux->s = p_next;
priv = vlc_stream_Private(p_demux);
p_demux->s = p_next;
p_demux->p_input_item = NULL;
p_demux->p_sys = NULL;
p_demux->psz_name = NULL;
p_demux->psz_url = NULL;
p_demux->psz_location = NULL;
p_demux->psz_filepath = NULL;
p_demux->out = NULL;
priv->module = module_need(p_demux, "demux_filter", p_name,
p_name != NULL);
if (priv->module == NULL)

View File

@ -123,6 +123,7 @@ vlc_stream_fifo_t *vlc_stream_fifo_New(vlc_object_t *parent, stream_t **reader)
sys = vlc_stream_Private(s);
sys->writer = writer;
s->pf_block = vlc_stream_fifo_Block;
s->pf_seek = NULL;
s->pf_control = vlc_stream_fifo_Control;
*reader = s;
return writer;