[vlc-commits] mpeg: replace another 1000000 with CLOCK_FREQ

Rémi Denis-Courmont git at videolan.org
Fri May 4 10:38:04 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May  4 11:34:08 2018 +0300| [f5bbdc22788470a65b973aaec7ea13506cf5b747] | committer: Rémi Denis-Courmont

mpeg: replace another 1000000 with CLOCK_FREQ

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5bbdc22788470a65b973aaec7ea13506cf5b747
---

 modules/demux/mpeg/es.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 9f5e4d2e2b..7d2e01ed65 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -351,7 +351,8 @@ static int Demux( demux_t *p_demux )
         }
         /* Re-estimate bitrate */
         if( p_sys->b_estimate_bitrate && p_sys->i_pts > (CLOCK_FREQ/2) )
-            p_sys->i_bitrate_avg = 8*1000000*p_sys->i_bytes/(p_sys->i_pts-1);
+            p_sys->i_bitrate_avg = 8 * CLOCK_FREQ * p_sys->i_bytes
+                                   / (p_sys->i_pts - 1);
         p_sys->i_bytes += p_block_out->i_buffer;
 
 



More information about the vlc-commits mailing list