[vlc-commits] demux:asf: handle the i_pkt_time_delta in vlc_tick_t instead of milliseconds

Steve Lhomme git at videolan.org
Tue Sep 18 11:01:50 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 18 10:18:45 2018 +0200| [7d05ad592d0fc5a006c4bb3b7fcfe4402e3d7e43] | committer: Steve Lhomme

demux:asf: handle the i_pkt_time_delta in vlc_tick_t instead of milliseconds

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

 modules/demux/asf/asfpacket.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/asf/asfpacket.c b/modules/demux/asf/asfpacket.c
index 6ee0ca38cc..ddce4d0146 100644
--- a/modules/demux/asf/asfpacket.c
+++ b/modules/demux/asf/asfpacket.c
@@ -208,7 +208,7 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
         return -1;
 
     int64_t i_pkt_time;
-    uint8_t i_pkt_time_delta = 0;
+    vlc_tick_t i_pkt_time_delta = 0;
     uint32_t i_payload_data_length = 0;
     uint32_t i_temp_payload_length = 0;
     *p_packetsys->pi_preroll = __MIN( *p_packetsys->pi_preroll, INT64_MAX );
@@ -250,7 +250,7 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
     {
         /* i_media_object_offset is *media* presentation time */
         /* Next byte is *media* Presentation Time Delta */
-        i_pkt_time_delta = pkt->p_peek[pkt->i_skip];
+        i_pkt_time_delta = VLC_TICK_FROM_MS(pkt->p_peek[pkt->i_skip]);
         b_ignore_pts = false;
         i_pkt_time = (vlc_tick_t)i_media_object_offset;
         i_pkt_time -= *p_packetsys->pi_preroll;
@@ -335,7 +335,7 @@ static int DemuxPayload(asf_packet_sys_t *p_packetsys, asf_packet_t *pkt, int i_
         SkipBytes( p_demux->s, pkt->i_skip );
 
         vlc_tick_t i_payload_pts;
-        i_payload_pts = i_pkt_time + (vlc_tick_t)i_pkt_time_delta * i_subpayload_count * 1000;
+        i_payload_pts = i_pkt_time + i_pkt_time_delta * i_subpayload_count;
         if ( p_tkinfo->p_sp )
             i_payload_pts -= VLC_TICK_FROM_MSFTIME(p_tkinfo->p_sp->i_time_offset);
 



More information about the vlc-commits mailing list