[vlc-devel] [PATCH 07/16] demux:asf: fix incorrect conversion i_time_offset in DemuxPayload()

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


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

diff --git a/modules/demux/asf/asfpacket.c b/modules/demux/asf/asfpacket.c
index cbcf2bab0e..3167c7d2ea 100644
--- a/modules/demux/asf/asfpacket.c
+++ b/modules/demux/asf/asfpacket.c
@@ -337,12 +337,12 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
         mtime_t i_payload_pts;
         i_payload_pts = i_pkt_time + (mtime_t)i_pkt_time_delta * i_subpayload_count * 1000;
         if ( p_tkinfo->p_sp )
-            i_payload_pts -= p_tkinfo->p_sp->i_time_offset * 10;
+            i_payload_pts -= MSFTIME_TO_MTIME(p_tkinfo->p_sp->i_time_offset);
 
         mtime_t i_payload_dts = i_pkt_time;
 
         if ( p_tkinfo->p_sp )
-            i_payload_dts -= p_tkinfo->p_sp->i_time_offset * 10;
+            i_payload_dts -= MSFTIME_TO_MTIME(p_tkinfo->p_sp->i_time_offset);
 
         if ( i_sub_payload_data_length &&
              DemuxSubPayload( p_packetsys, i_stream_number, &p_tkinfo->p_frame,
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index c483b5f28b..9404b06086 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -121,7 +121,7 @@ typedef struct
 
     guid_t  i_stream_type;
     guid_t  i_error_correction_type;
-    uint64_t     i_time_offset;
+    msftime_t    i_time_offset;
     uint32_t     i_type_specific_data_length;
     uint32_t     i_error_correction_data_length;
     uint16_t     i_flags;
-- 
2.17.0



More information about the vlc-devel mailing list