Commit 218e5b8a authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: reuse decoders when fmt is compatible (fix #5394)

Avoids rebuffering.
Wrong way reverted by 1d6f8d8174d4e2c704732f7ec13c71df6dd8950d
parent a0110b72
......@@ -1845,12 +1845,16 @@ static void Ogg_CreateES( demux_t *p_demux )
p_stream->b_finished = false;
p_stream->b_reinit = false;
p_stream->b_initializing = false;
bool b_resetdecoder = Ogg_LogicalStreamResetEsFormat( p_demux, p_stream );
es_format_Copy( &p_stream->fmt_old, &p_old_stream->fmt );
p_old_stream->p_es = NULL;
p_old_stream = NULL;
es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
p_stream->p_es, &p_stream->fmt );
if ( b_resetdecoder )
{
es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
p_stream->p_es, &p_stream->fmt );
}
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment