[vlc-devel] [PATCH 09/16] demux:asf: i_play_duration/i_send_duration are msftime_t

Steve Lhomme robux4 at ycbcr.xyz
Thu Jun 7 11:59:53 CEST 2018


---
 modules/demux/asf/asf.c    | 2 +-
 modules/demux/asf/libasf.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 5671dd39f2..16c1117d04 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -1247,7 +1247,7 @@ static int DemuxInit( demux_t *p_demux )
                   p_sys->p_fp->i_min_data_packet_size;
 
         /* calculate the time duration in micro-s */
-        p_sys->i_length = (mtime_t)p_sys->p_fp->i_play_duration / 10 *
+        p_sys->i_length = MSFTIME_TO_MTIME(p_sys->p_fp->i_play_duration) *
                    (mtime_t)i_count /
                    (mtime_t)p_sys->p_fp->i_data_packets_count - p_sys->p_fp->i_preroll * 1000;
         if( p_sys->i_length < 0 )
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index bec83df2dc..e35c21a0cf 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -104,8 +104,8 @@ typedef struct
     uint64_t     i_file_size;
     uint64_t     i_creation_date;
     uint64_t     i_data_packets_count;
-    uint64_t     i_play_duration;
-    uint64_t     i_send_duration;
+    msftime_t    i_play_duration;
+    msftime_t    i_send_duration;
     uint64_t     i_preroll;
     uint32_t     i_flags;
     uint32_t     i_min_data_packet_size;
-- 
2.17.0



More information about the vlc-devel mailing list