[vlc-commits] demux:asf: i_average_time_per_frame is an msftime_t

Steve Lhomme git at videolan.org
Fri Jul 6 09:20:17 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun  7 10:54:16 2018 +0200| [7cb4c2e13c55aef14e9290d2043bb31be5bf21bf] | committer: Steve Lhomme

demux:asf: i_average_time_per_frame is an msftime_t

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

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

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index fc992a316a..c4f13a3fa0 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -317,9 +317,9 @@ static void WaitKeyframe( demux_t *p_demux )
         {
             /* 1 min if fastseek, otherwise 5 sec */
             /* That's a guess for bandwidth */
-            uint64_t i_maxwaittime = ( p_sys->b_canfastseek ) ? 600000000 : 50000000;
-            i_maxwaittime /= tk->info.p_esp->i_average_time_per_frame;
-            p_sys->i_wait_keyframe = __MIN( i_maxwaittime, UINT_MAX );
+            msftime_t i_maxwaittime = MSFTIME_FROM_SEC( p_sys->b_canfastseek ? 60 : 5);
+            uint64_t frames = i_maxwaittime / tk->info.p_esp->i_average_time_per_frame;
+            p_sys->i_wait_keyframe = __MIN( frames, UINT_MAX );
         }
         else
         {
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index e35c21a0cf..9f2cb9f356 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -281,7 +281,7 @@ typedef struct
     uint32_t i_flags;
     uint16_t i_stream_number;
     uint16_t i_language_index;
-    uint64_t i_average_time_per_frame;
+    msftime_t i_average_time_per_frame;
 
     uint16_t i_stream_name_count;
 



More information about the vlc-commits mailing list