[vlc-devel] commit: When deleting track, reduce stream bitrate too, unless bitrate is ( Ilkka Ollakka )
git version control
git at videolan.org
Wed Jul 2 22:29:02 CEST 2008
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jul 2 23:30:13 2008 +0300| [d34e1a85ea38816ca5083082be88b803e5bf580d]
When deleting track, reduce stream bitrate too, unless bitrate is
defined from commandline.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d34e1a85ea38816ca5083082be88b803e5bf580d
---
modules/mux/asf.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 9196981..52a4553 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -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;
}
More information about the vlc-devel
mailing list