[vlc-devel] [PATCH 1/8] mux: ps: use CLOCK_FREQ for vlc_tick_t based conversions

Thomas Guillem thomas at gllm.fr
Fri Aug 14 10:16:01 CEST 2020


Set LGTM

On Thu, Aug 13, 2020, at 14:12, Steve Lhomme wrote:
> We don't have a helper, yet, to convert ticks to a bitrate.
> ---
>  modules/mux/mpeg/ps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c
> index 86d33b2e8fc..4e969eb4220 100644
> --- a/modules/mux/mpeg/ps.c
> +++ b/modules/mux/mpeg/ps.c
> @@ -490,7 +490,7 @@ static int Mux( sout_mux_t *p_mux )
>                  if( p_sys->i_instant_size &&
>                      i_dts - p_sys->i_instant_dts > 
> VLC_TICK_FROM_SEC(1))
>                  {
> -                    int64_t i_instant_bitrate = p_sys->i_instant_size 
> * 8000000 /
> +                    int64_t i_instant_bitrate = p_sys->i_instant_size 
> * 8 * CLOCK_FREQ /
>                              ( i_dts - p_sys->i_instant_dts );
>  
>                      p_sys->i_instant_bitrate += i_instant_bitrate;
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list