Commit 8894a8af authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ogg: remove reset/delayed format updates.

No longer needed since ES are now created after headers.
parent dfd3fa1e
...@@ -336,17 +336,7 @@ static int Demux( demux_t * p_demux ) ...@@ -336,17 +336,7 @@ static int Demux( demux_t * p_demux )
for( i_stream = 0; i_stream < p_sys->i_streams; i_stream++ ) for( i_stream = 0; i_stream < p_sys->i_streams; i_stream++ )
{ {
logical_stream_t *p_stream = p_sys->pp_stream[i_stream]; logical_stream_t *p_stream = p_sys->pp_stream[i_stream];
if ( p_stream->b_have_updated_format ) Ogg_ApplySkeleton( p_stream );
{
p_stream->b_have_updated_format = false;
if ( p_stream->p_skel ) Ogg_ApplySkeleton( p_stream );
if ( p_stream->p_es )
{
msg_Dbg( p_demux, "Resetting format for stream %d", i_stream );
es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
p_stream->p_es, &p_stream->fmt );
}
}
} }
} }
} }
...@@ -1074,25 +1064,6 @@ static void Ogg_DecodePacket( demux_t *p_demux, ...@@ -1074,25 +1064,6 @@ static void Ogg_DecodePacket( demux_t *p_demux,
else else
p_stream->fmt.i_extra = 0; p_stream->fmt.i_extra = 0;
if( Ogg_LogicalStreamResetEsFormat( p_demux, p_stream ) )
{
if ( p_ogg->p_skelstream )
{
/* We delay until eos is reached on skeleton.
* There should only be headers, as no data page is
* allowed before skeleton's eos.
* Skeleton data is appended to fmt on skeleton eos.
*/
p_stream->b_have_updated_format = true;
}
else
{
if ( p_stream->p_es )
/* Otherwise we set config from first headers */
es_out_Control( p_demux->out, ES_OUT_SET_ES_FMT,
p_stream->p_es, &p_stream->fmt );
}
}
if( p_stream->i_headers > 0 ) if( p_stream->i_headers > 0 )
Ogg_ExtractMeta( p_demux, & p_stream->fmt, Ogg_ExtractMeta( p_demux, & p_stream->fmt,
p_stream->p_headers, p_stream->i_headers ); p_stream->p_headers, p_stream->i_headers );
...@@ -1424,6 +1395,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux ) ...@@ -1424,6 +1395,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
es_format_Init( &p_stream->fmt, 0, 0 ); es_format_Init( &p_stream->fmt, 0, 0 );
es_format_Init( &p_stream->fmt_old, 0, 0 ); es_format_Init( &p_stream->fmt_old, 0, 0 );
p_stream->b_initializing = true;
/* Setup the logical stream */ /* Setup the logical stream */
p_stream->i_serial_no = ogg_page_serialno( &p_ogg->current_page ); p_stream->i_serial_no = ogg_page_serialno( &p_ogg->current_page );
...@@ -1829,7 +1801,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux ) ...@@ -1829,7 +1801,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
} }
/* we'll need to get all headers */ /* we'll need to get all headers */
p_ogg->pp_stream[i_stream]->b_initializing |= p_ogg->pp_stream[i_stream]->b_force_backup; p_ogg->pp_stream[i_stream]->b_initializing &= p_ogg->pp_stream[i_stream]->b_force_backup;
if( Ogg_ReadPage( p_demux, &p_ogg->current_page ) != VLC_SUCCESS ) if( Ogg_ReadPage( p_demux, &p_ogg->current_page ) != VLC_SUCCESS )
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -58,7 +58,6 @@ typedef struct logical_stream_s ...@@ -58,7 +58,6 @@ typedef struct logical_stream_s
* data for the decoder. We back them up here in case we need to re-feed * data for the decoder. We back them up here in case we need to re-feed
* them to the decoder. */ * them to the decoder. */
bool b_force_backup; bool b_force_backup;
bool b_have_updated_format;
int i_packets_backup; int i_packets_backup;
int32_t i_extra_headers_packets; int32_t i_extra_headers_packets;
void *p_headers; void *p_headers;
......
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