Commit c1abcb01 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

decoders: use vlc_custom_create, generic objects (except in input)

As far as I know, the distinction only matters anymore in the input
loop, for E/S out decoders (due to the evil ObjectKillChildren).
parent f7b25b3f
......@@ -302,7 +302,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return NULL;
/* Create decoder object */
p_sys->p_decoder = vlc_object_create( p_stream, VLC_OBJECT_DECODER );
p_sys->p_decoder = vlc_object_create( p_stream, sizeof( decoder_t ) );
if( !p_sys->p_decoder )
return NULL;
vlc_object_attach( p_sys->p_decoder, p_stream );
......
......@@ -553,7 +553,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id->p_encoder = NULL;
/* Create decoder object */
id->p_decoder = vlc_object_create( p_stream, VLC_OBJECT_DECODER );
id->p_decoder = vlc_object_create( p_stream, sizeof( decoder_t ) );
if( !id->p_decoder )
goto error;
vlc_object_attach( id->p_decoder, p_stream );
......
......@@ -696,7 +696,8 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
decoder_owner_sys_t *p_owner;
es_format_t null_es_format;
p_dec = vlc_object_create( p_input, VLC_OBJECT_DECODER );
p_dec = vlc_custom_create( p_input, sizeof( *p_dec ), VLC_OBJECT_DECODER,
"decoder" );
if( p_dec == NULL )
return NULL;
......@@ -771,7 +772,8 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
p_dec->b_need_packetized && !p_dec->fmt_in.b_packetized )
{
p_dec->p_owner->p_packetizer =
vlc_object_create( p_input, VLC_OBJECT_DECODER );
vlc_custom_create( p_input, sizeof( decoder_t ),
VLC_OBJECT_DECODER, "packetizer" );
if( p_dec->p_owner->p_packetizer )
{
es_format_Copy( &p_dec->p_owner->p_packetizer->fmt_in,
......
......@@ -312,8 +312,9 @@ int demux_vaControlHelper( stream_t *s,
****************************************************************************/
decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg )
{
decoder_t *p_packetizer = vlc_object_create( p_demux, VLC_OBJECT_DECODER );
decoder_t *p_packetizer;
p_packetizer = vlc_custom_create( p_demux, sizeof( *p_packetizer ),
VLC_OBJECT_GENERIC, "demux packetizer" );
if( !p_packetizer )
{
es_format_Clean( p_fmt );
......
......@@ -648,7 +648,8 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
{
decoder_t *p_dec;
p_dec = vlc_object_create( p_this, VLC_OBJECT_DECODER );
p_dec = vlc_custom_create( p_this, sizeof( *p_dec ), VLC_OBJECT_GENERIC,
"image decoder" );
if( p_dec == NULL )
return NULL;
......
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