Commit d34e1a85 authored by Ilkka Ollakka's avatar Ilkka Ollakka

When deleting track, reduce stream bitrate too, unless bitrate is

defined from commandline.
parent a781fc4b
......@@ -597,7 +597,27 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
VLC_UNUSED(p_input);
/* if bitrate ain't defined in commanline, reduce it when tracks are deleted
*/
sout_mux_sys_t *p_sys = p_mux->p_sys;
asf_track_t *tk = p_input->p_sys;
if(!p_sys->i_bitrate_override)
{
if( tk->i_cat == AUDIO_ES )
{
if( p_input->p_fmt->i_bitrate > 24000 )
p_sys->i_bitrate -= p_input->p_fmt->i_bitrate;
else
p_sys->i_bitrate -= 512000;
}
else if(tk->i_cat == VIDEO_ES )
{
if( p_input->p_fmt->i_bitrate > 50000 )
p_sys->i_bitrate -= p_input->p_fmt->i_bitrate;
else
p_sys->i_bitrate -= 1000000;
}
}
msg_Dbg( p_mux, "removing input" );
return VLC_SUCCESS;
}
......
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