[vlc-commits] mux:asf: don't set the duration if it's going to be negative
Steve Lhomme
git at videolan.org
Tue Sep 18 13:53:26 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 13:13:59 2018 +0200| [1244c919b25028d01159d7fdc283d034a9447b40] | committer: Steve Lhomme
mux:asf: don't set the duration if it's going to be negative
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1244c919b25028d01159d7fdc283d034a9447b40
---
modules/mux/asf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index e611befe50..38b6b81124 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -854,10 +854,9 @@ static block_t *asf_header_create( sout_mux_t *p_mux, bool b_broadcast )
msg_Dbg( p_mux, "Asf muxer creating header" );
- if( p_sys->i_dts_first != VLC_TICK_INVALID )
+ if( p_sys->i_dts_first != VLC_TICK_INVALID && p_sys->i_dts_last > p_sys->i_dts_first )
{
i_duration = p_sys->i_dts_last - p_sys->i_dts_first;
- if( i_duration < 0 ) i_duration = 0;
}
/* calculate header size */
More information about the vlc-commits
mailing list