[vlc-commits] modules: use VLC_HARD_MIN_SLEEP instead of hardcoded values

Steve Lhomme git at videolan.org
Mon May 7 08:49:07 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon May  7 08:34:28 2018 +0200| [4f672c3f1ed51330795330a0831d32c17bca29ab] | committer: Steve Lhomme

modules: use VLC_HARD_MIN_SLEEP instead of hardcoded values

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

 modules/access/avcapture.m | 2 +-
 modules/access/dc1394.c    | 2 +-
 modules/access/idummy.c    | 4 ++--
 modules/access/qtsound.m   | 2 +-
 modules/demux/avi/avi.c    | 6 +++---
 modules/demux/ogg.c        | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index 7a76b75652..060deab58c 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -408,7 +408,7 @@ static int Demux(demux_t *p_demux)
             {
                 /* Nothing to display yet, just forget */
                 block_Release(p_block);
-                msleep(10000);
+                msleep(VLC_HARD_MIN_SLEEP);
                 return 1;
             }
             else if ( !p_sys->b_es_setup )
diff --git a/modules/access/dc1394.c b/modules/access/dc1394.c
index f3e381f4a4..b8312d3d62 100644
--- a/modules/access/dc1394.c
+++ b/modules/access/dc1394.c
@@ -470,7 +470,7 @@ static int Demux( demux_t *p_demux )
         /* Sleep so we do not consume all the cpu, 10ms seems
          * like a good value (100fps)
          */
-        msleep( 10000 );
+        msleep( VLC_HARD_MIN_SLEEP );
         return 1;
     }
 
diff --git a/modules/access/idummy.c b/modules/access/idummy.c
index b0e82166c5..aa80868975 100644
--- a/modules/access/idummy.c
+++ b/modules/access/idummy.c
@@ -56,7 +56,7 @@ static int DemuxNoOp( demux_t *demux )
 static int DemuxHold( demux_t *demux )
 {
     (void) demux;
-    msleep( 10000 ); /* FIXME!!! */
+    msleep( VLC_HARD_MIN_SLEEP ); /* FIXME!!! */
     return 1;
 }
 
@@ -74,7 +74,7 @@ static int DemuxPause( demux_t *demux )
     if( now >= p_sys->end )
         return 0;
 
-    msleep( 10000 ); /* FIXME!!! */
+    msleep( VLC_HARD_MIN_SLEEP ); /* FIXME!!! */
     return 1;
 }
 
diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m
index 93ce8cffae..9a16bb0a9e 100644
--- a/modules/access/qtsound.m
+++ b/modules/access/qtsound.m
@@ -516,7 +516,7 @@ static int Demux(demux_t *p_demux)
             block_Release(p_blocka);
 
             // Nothing to transfer yet, just forget
-            msleep(10000);
+            msleep(VLC_HARD_MIN_SLEEP);
             return 1;
         }
 
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 23cc585c0d..d3383a1786 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1186,7 +1186,7 @@ static int Demux_Seekable( demux_t *p_demux )
                      * affect the reading speed too much. */
                     if( !(++i_loop_count % 1024) )
                     {
-                        msleep( 10000 );
+                        msleep( VLC_HARD_MIN_SLEEP );
 
                         if( !(i_loop_count % (1024 * 10)) )
                             msg_Warn( p_demux,
@@ -1919,7 +1919,7 @@ static int AVI_StreamChunkFind( demux_t *p_demux, unsigned int i_stream )
              * affect the reading speed too much. */
             if( !(++i_loop_count % 1024) )
             {
-                msleep( 10000 );
+                msleep( VLC_HARD_MIN_SLEEP );
 
                 if( !(i_loop_count % (1024 * 10)) )
                     msg_Warn( p_demux, "don't seem to find any data..." );
@@ -2338,7 +2338,7 @@ static int AVI_PacketSearch( demux_t *p_demux )
          * this code is called only on broken files). */
         if( !(++i_count % 1024) )
         {
-            msleep( 10000 );
+            msleep( VLC_HARD_MIN_SLEEP );
             if( !(i_count % (1024 * 10)) )
                 msg_Warn( p_demux, "trying to resync..." );
         }
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 3118dffb9c..f0c85cc677 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1481,7 +1481,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
             /* FIXME: the biggest hack I've ever done */
             msg_Warn( p_demux, "tarkin pts: %"PRId64", granule: %"PRId64,
                       p_block->i_pts, p_block->i_dts );
-            msleep(10000);
+            msleep(VLC_HARD_MIN_SLEEP);
         }
 
         /* Blatant abuse of the i_length field. */



More information about the vlc-commits mailing list