[vlc-commits] http: return an error when file size is unknown

Rémi Denis-Courmont git at videolan.org
Mon Aug 31 17:45:07 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 18:36:04 2015 +0300| [1d96a2e72c10986fc5665acf6b7008f4264e022a] | committer: Rémi Denis-Courmont

http: return an error when file size is unknown

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

 modules/access/http.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/http.c b/modules/access/http.c
index 805f5ae..707ca5a 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -925,6 +925,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
 
         case ACCESS_GET_SIZE:
+            if( !p_sys->b_has_size )
+                return VLC_EGENERIC;
             pi_64 = (int64_t*)va_arg( args, int64_t * );
             *pi_64 = p_sys->size;
            break;



More information about the vlc-commits mailing list