[vlc-commits] mux:ts: simplify i_shaping_delay reading
Steve Lhomme
git at videolan.org
Tue Sep 18 15:55:47 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 18 14:43:54 2018 +0200| [bcfd32f4640f4d252f56eff02889c8862bf8314b] | committer: Steve Lhomme
mux:ts: simplify i_shaping_delay reading
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcfd32f4640f4d252f56eff02889c8862bf8314b
---
modules/mux/mpeg/ts.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 042786b1f7..c4b3452c7d 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -372,7 +372,7 @@ typedef struct
int64_t i_bitrate_min;
int64_t i_bitrate_max;
- int64_t i_shaping_delay;
+ vlc_tick_t i_shaping_delay;
int64_t i_pcr_delay;
vlc_tick_t i_dts_delay;
@@ -708,14 +708,17 @@ static int Open( vlc_object_t *p_this )
}
var_Get( p_mux, SOUT_CFG_PREFIX "shaping", &val );
- p_sys->i_shaping_delay = val.i_int * 1000;
- if( p_sys->i_shaping_delay <= 0 )
+ if( val.i_int <= 0 )
{
msg_Err( p_mux,
"invalid shaping (%"PRId64"ms) resetting to 200ms",
- p_sys->i_shaping_delay / 1000 );
+ val.i_int );
p_sys->i_shaping_delay = VLC_TICK_FROM_MS(200);
}
+ else
+ {
+ p_sys->i_shaping_delay = VLC_TICK_FROM_MS(val.i_int);
+ }
var_Get( p_mux, SOUT_CFG_PREFIX "pcr", &val );
p_sys->i_pcr_delay = val.i_int * 1000;
More information about the vlc-commits
mailing list