Commit 9229335a authored by Rafaël Carré's avatar Rafaël Carré

TS mux: simplify unsupported codec path

parent 13b4e116
......@@ -925,11 +925,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
msg_Dbg( p_mux, "adding input codec=%4.4s pid=%d",
(char*)&p_stream->i_codec, p_stream->i_pid );
switch( p_input->p_fmt->i_cat )
{
case VIDEO_ES:
p_stream->i_stream_type = -1;
switch( p_input->p_fmt->i_codec )
{
/* VIDEO */
case VLC_CODEC_MPGV:
/* TODO: do we need to check MPEG-I/II ? */
p_stream->i_stream_type = 0x02;
......@@ -965,15 +965,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream->i_stream_id = (PES_EXTENDED_STREAM_ID << 8) | 0x60;
p_stream->i_stream_type = 0xd1;
break;
default:
free( p_stream );
return VLC_EGENERIC;
}
break;
case AUDIO_ES:
switch( p_input->p_fmt->i_codec )
{
/* AUDIO */
case VLC_CODEC_MPGA:
p_stream->i_stream_type =
p_input->p_fmt->audio.i_rate >= 32000 ? 0x03 : 0x04;
......@@ -1004,15 +998,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_sys->i_mpeg4_streams++;
p_stream->i_es_id = p_stream->i_pid;
break;
default:
free( p_stream );
return VLC_EGENERIC;
}
break;
case SPU_ES:
switch( p_input->p_fmt->i_codec )
{
/* TEXT */
case VLC_CODEC_SPU:
p_stream->i_stream_type = 0x82;
p_stream->i_stream_id = 0xbd;
......@@ -1032,13 +1020,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream->i_stream_type = 0x06;
p_stream->i_stream_id = 0xbd; /* FIXME */
break;
default:
free( p_stream );
return VLC_EGENERIC;
}
break;
default:
if (p_stream->i_stream_type == -1)
{
free( p_stream );
return VLC_EGENERIC;
}
......
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