[vlc-commits] lua: use inflate rather than decomp stream filter

Rémi Denis-Courmont git at videolan.org
Fri Sep 9 08:36:59 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Sep  9 09:36:09 2016 +0300| [540a843f42a4091d94412baf18e7c208a981929c] | committer: Rémi Denis-Courmont

lua: use inflate rather than decomp stream filter

The inflate filter supports deflate in addition to gzip, and works on
all platforms.

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

 modules/lua/libs/stream.c      | 10 +++++-----
 modules/stream_filter/decomp.c |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/lua/libs/stream.c b/modules/lua/libs/stream.c
index e3092b7..2cfd644 100644
--- a/modules/lua/libs/stream.c
+++ b/modules/lua/libs/stream.c
@@ -86,13 +86,13 @@ static int vlclua_stream_new( lua_State *L )
     const char * psz_url = luaL_checkstring( L, 1 );
     stream_t *p_stream = vlc_stream_NewMRL( p_this, psz_url );
 
-    /* XXX: For hysterical raisins, append one stream decompression filter
-     * automatically (if applicable). */
+    /* XXX: For hysterical raisins, append one inflate decompression stream
+     * filter automatically (if applicable). */
     if( p_stream != NULL )
     {
-        stream_t *uncompressed = vlc_stream_FilterNew( p_stream, "decomp" );
-        if( uncompressed != NULL )
-            p_stream = uncompressed;
+        stream_t *inflated = vlc_stream_FilterNew( p_stream, "inflate" );
+        if( inflated != NULL )
+            p_stream = inflated;
     }
     return vlclua_stream_new_inner( L, p_stream );
 }
diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index 8a6a7a6..d8bc579 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -70,6 +70,7 @@ vlc_module_begin ()
     add_submodule ()
     set_description (N_("gzip decompression"))
     set_callbacks (OpenGzip, Close)
+    add_shortcut ("inflate")
 vlc_module_end ()
 
 struct stream_sys_t



More information about the vlc-commits mailing list