[vlc-commits] input: remove write-only INPUT_UPDATE_SIZE

Rémi Denis-Courmont git at videolan.org
Wed Apr 17 22:23:29 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 17 23:15:55 2013 +0300| [2e42f02431c964a3f0daeebebc31cb8b009bba17] | committer: Rémi Denis-Courmont

input: remove write-only INPUT_UPDATE_SIZE

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

 include/vlc_input.h          |    1 -
 modules/access/file.c        |    6 +-----
 modules/access/vcd/vcd.c     |    4 ++--
 modules/access/vcdx/access.c |    3 +--
 modules/access/vdr.c         |    2 --
 src/input/input.c            |    4 ----
 6 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 37358d6..b48a256 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -203,7 +203,6 @@ static inline void vlc_input_attachment_Delete( input_attachment_t *a )
  *****************************************************************************/
 
 /* i_update field of access_t/demux_t */
-#define INPUT_UPDATE_SIZE       0x0001
 #define INPUT_UPDATE_TITLE      0x0010
 #define INPUT_UPDATE_SEEKPOINT  0x0020
 #define INPUT_UPDATE_META       0x0040
diff --git a/modules/access/file.c b/modules/access/file.c
index b62a004..37c1a2b 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -313,12 +313,8 @@ static ssize_t FileRead (access_t *p_access, uint8_t *p_buffer, size_t i_len)
     {
         struct stat st;
 
-        if ((fstat (fd, &st) == 0)
-         && (p_access->info.i_size != (uint64_t)st.st_size))
-        {
+        if (fstat (fd, &st) == 0)
             p_access->info.i_size = st.st_size;
-            p_access->info.i_update |= INPUT_UPDATE_SIZE;
-        }
     }
     return val;
 }
diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c
index 6320136..817f565 100644
--- a/modules/access/vcd/vcd.c
+++ b/modules/access/vcd/vcd.c
@@ -273,7 +273,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
             {
                 /* Update info */
                 p_access->info.i_update |=
-                  INPUT_UPDATE_TITLE|INPUT_UPDATE_SEEKPOINT|INPUT_UPDATE_SIZE;
+                                     INPUT_UPDATE_TITLE|INPUT_UPDATE_SEEKPOINT;
                 p_access->info.i_title = i;
                 p_access->info.i_seekpoint = 0;
                 p_access->info.i_size = p_sys->title[i]->i_size;
@@ -336,7 +336,7 @@ static block_t *Block( access_t *p_access )
         }
 
         p_access->info.i_update |=
-            INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT | INPUT_UPDATE_SIZE;
+                                   INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
         p_access->info.i_title++;
         p_access->info.i_seekpoint = 0;
         p_access->info.i_size = p_sys->title[p_access->info.i_title]->i_size;
diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c
index b823fb4..517264a 100644
--- a/modules/access/vcdx/access.c
+++ b/modules/access/vcdx/access.c
@@ -715,8 +715,7 @@ VCDSetOrigin( access_t *p_access, lsn_t i_lsn, track_t i_track,
                   p_vcdplayer->play_item.type );
     }
 
-    p_access->info.i_update = INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE
-                              |INPUT_UPDATE_SEEKPOINT;
+    p_access->info.i_update = INPUT_UPDATE_TITLE|INPUT_UPDATE_SEEKPOINT;
 
     VCDUpdateTitle( p_access );
 
diff --git a/modules/access/vdr.c b/modules/access/vdr.c
index fbaeaf0..ddf1a96 100644
--- a/modules/access/vdr.c
+++ b/modules/access/vdr.c
@@ -481,7 +481,6 @@ static bool ImportNextFile( access_t *p_access )
 
     ARRAY_APPEND( p_sys->file_sizes, st.st_size );
     p_access->info.i_size += st.st_size;
-    p_access->info.i_update |= INPUT_UPDATE_SIZE;
 
     return true;
 }
@@ -586,7 +585,6 @@ static void UpdateFileSize( access_t *p_access )
     p_access->info.i_size -= CURRENT_FILE_SIZE;
     CURRENT_FILE_SIZE = st.st_size;
     p_access->info.i_size += CURRENT_FILE_SIZE;
-    p_access->info.i_update |= INPUT_UPDATE_SIZE;
 }
 
 /*****************************************************************************
diff --git a/src/input/input.c b/src/input/input.c
index 51de641..c5dc1fc 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2208,8 +2208,6 @@ static void UpdateGenericFromDemux( input_thread_t *p_input )
         }
         p_demux->info.i_update &= ~INPUT_UPDATE_META;
     }
-
-    p_demux->info.i_update &= ~INPUT_UPDATE_SIZE;
 }
 
 static void UpdateTitleListfromDemux( input_thread_t *p_input )
@@ -2293,8 +2291,6 @@ static void UpdateGenericFromAccess( input_thread_t *p_input )
 
         p_access->info.i_update &= ~INPUT_UPDATE_SIGNAL;
     }
-
-    p_access->info.i_update &= ~INPUT_UPDATE_SIZE;
 }
 
 /*****************************************************************************



More information about the vlc-commits mailing list