[vlc-devel] commit: Reading regular and block files can always be paced ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Apr 8 17:52:05 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Apr  8 18:49:08 2009 +0300| [2c87bceb5da1413470a8e22e38cd654e6439fad5] | committer: Rémi Denis-Courmont 

Reading regular and block files can always be paced

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

 modules/access/file.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/access/file.c b/modules/access/file.c
index 3b210fa..cc7da19 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -127,11 +127,7 @@ static int Open( vlc_object_t *p_this )
 
     STANDARD_READ_ACCESS_INIT;
     p_sys->i_nb_reads = 0;
-
-    if (!strcasecmp (p_access->psz_access, "stream"))
-        p_sys->b_pace_control = false;
-    else
-        p_sys->b_pace_control = true;
+    p_sys->b_pace_control = true;
 
     /* Open file */
     int fd = -1;
@@ -166,7 +162,10 @@ static int Open( vlc_object_t *p_this )
     if (S_ISREG (st.st_mode))
         p_access->info.i_size = st.st_size;
     else if (!S_ISBLK (st.st_mode))
+    {
         p_access->pf_seek = NoSeek;
+        p_sys->b_pace_control = strcasecmp (p_access->psz_access, "stream");
+    }
 #else
 # warning File size not known!
 #endif




More information about the vlc-devel mailing list