Commit 373950c7 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

modules:decoders: only set the codec ID rather than init the whole ES format

It's already initialized when the decoder is created.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 580c27be
......@@ -417,7 +417,7 @@ static int OpenDecoder( vlc_object_t *p_this )
#endif
es_format_Init( &p_dec->fmt_out, SPU_ES, 0 );
p_dec->fmt_out.i_codec = 0; // may vary during the stream
/* add the decoder to the global list */
decoder_t **list = realloc( kate_decoder_list, (kate_decoder_list_size+1) * sizeof( *list ));
......
......@@ -236,7 +236,7 @@ static int Open( vlc_object_t *object )
dec->p_sys = p_sys;
dec->pf_decode = Decode;
es_format_Init( &dec->fmt_out, SPU_ES, 0 );
dec->fmt_out.i_codec = 0;
return VLC_SUCCESS;
}
......
......@@ -503,7 +503,7 @@ static int Open(vlc_object_t *object)
sys->segment_buffer = NULL;
dec->pf_decode = Decode;
es_format_Init(&dec->fmt_out, SPU_ES, VLC_CODEC_YUVP);
dec->fmt_out.i_codec = VLC_CODEC_YUVP;
return VLC_SUCCESS;
}
......
......@@ -91,7 +91,7 @@ static int DecoderOpen( vlc_object_t *p_this )
p_sys->i_spu = 0;
p_sys->p_block = NULL;
es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_CODEC_SPU );
p_dec->fmt_out.i_codec = VLC_CODEC_SPU;
p_dec->pf_decode = Decode;
p_dec->pf_packetize = NULL;
......
......@@ -130,7 +130,7 @@ static int DecoderOpen( vlc_object_t *p_this )
p_sys->i_state = SUBTITLE_BLOCK_EMPTY;
p_sys->p_spu = NULL;
es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_CODEC_OGT );
p_dec->fmt_out.i_codec = VLC_CODEC_OGT;
p_dec->pf_decode = Decode;
p_dec->pf_packetize = Packetize;
......
......@@ -276,8 +276,7 @@ static int Open( vlc_object_t *p_this )
/* Listen for keys */
var_AddCallback( p_dec->obj.libvlc, "key-pressed", EventKey, p_dec );
es_format_Init( &p_dec->fmt_out, SPU_ES,
p_sys->b_text ? VLC_CODEC_TEXT : VLC_CODEC_RGBA );
p_dec->fmt_out.i_codec = p_sys->b_text ? VLC_CODEC_TEXT : VLC_CODEC_RGBA;
p_dec->pf_decode = Decode;
return VLC_SUCCESS;
......
......@@ -86,7 +86,7 @@ static int OpenDecoder ( vlc_object_t *p_this )
p_dec->pf_decode = DecodeBlock;
/* */
es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_I420 );
p_dec->fmt_out.i_codec = VLC_CODEC_I420;
p_dec->fmt_out.video.i_width = 100;
p_dec->fmt_out.video.i_height = 100;
p_dec->fmt_out.video.i_sar_num = 1;
......
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