]> git.sesse.net Git - vlc/commitdiff
* modules/mux/mpeg/ts.c: Fixed a possible segfault in the shaping code.
authorChristophe Massiot <massiot@videolan.org>
Wed, 12 May 2004 18:48:25 +0000 (18:48 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 12 May 2004 18:48:25 +0000 (18:48 +0000)
modules/mux/mpeg/ts.c

index 60f6a1e40bf3810bcfb21616d2a0dfc7eb6dfcd6..9bfa7ed3a774c45903add5efd972d90fa43a0d02 100644 (file)
@@ -1101,7 +1101,7 @@ static void TSDate( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
     int i_packet_count = p_chain_ts->i_depth;
     int i;
 
-    if ( i_pcr_length > 0 )
+    if ( i_pcr_length / 1000 > 0 )
     {
         int i_bitrate = ((uint64_t)i_packet_count * 188 * 8000)
                           / (uint64_t)(i_pcr_length / 1000);