[vlc-devel] [PATCH 3/3] access: archive: don't ignore error codes of archive_read_data()

Hannes Domani ssbssa at yahoo.de
Mon Jul 27 19:39:00 CEST 2015


---
 modules/access/archive/access.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access/archive/access.c b/modules/access/archive/access.c
index 64c2445..aaa6ade 100644
--- a/modules/access/archive/access.c
+++ b/modules/access/archive/access.c
@@ -51,12 +51,14 @@ static ssize_t Read(access_t *p_access, uint8_t *p_data, size_t i_size)
 {
     access_sys_t *p_sys = p_access->p_sys;
 
-    size_t i_read = 0;
+    ssize_t i_read = 0;
 
     i_read = archive_read_data(p_sys->p_archive, p_data, i_size);
 
     if (i_read > 0)
         p_access->info.i_pos += i_read;
+    else
+        i_read = 0;
 
     if (i_size > 0 && i_read <= 0)
         p_access->info.b_eof = true;
-- 
2.4.6




More information about the vlc-devel mailing list