[vlc-commits] demux: use samples_from_vlc_tick to convert ticks to blocks

Steve Lhomme git at videolan.org
Mon Aug 17 16:14:36 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Aug 13 06:55:41 2020 +0200| [c25d524faeddf4663e5f5791b65fd68c7fde082e] | committer: Steve Lhomme

demux: use samples_from_vlc_tick to convert ticks to blocks

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

 src/input/demux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/demux.c b/src/input/demux.c
index 55ffbb5165..5024c9576e 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -359,7 +359,7 @@ int demux_vaControlHelper( stream_t *s,
             i64 = va_arg( args, vlc_tick_t );
             if( i_bitrate > 0 && i64 >= 0 )
             {
-                int64_t i_block = i64 * i_bitrate / INT64_C(8000000) / i_align;
+                int64_t i_block = samples_from_vlc_tick( i64, i_bitrate ) / (8 * i_align);
                 if( vlc_stream_Seek( s, i_start + i_block * i_align ) )
                 {
                     return VLC_EGENERIC;



More information about the vlc-commits mailing list