[vlc-commits] gme: limit to 16 MiB if file size is unknown

Rémi Denis-Courmont git at videolan.org
Wed Oct 21 18:22:22 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 23 22:39:34 2015 +0300| [0c225836002f1672adad9a983404ea44e09e1593] | committer: Jean-Baptiste Kempf

gme: limit to 16 MiB if file size is unknown

Allocating and reading 100 MiB at once for a remote file was a bit
excessive IMHO.

(cherry picked from commit 71d711709c8ad59b7468bc77ab1398ebdf9ff3d8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=0c225836002f1672adad9a983404ea44e09e1593
---

 modules/demux/gme.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index e50bd4a..4baa5a3 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -88,8 +88,8 @@ static int Open (vlc_object_t *obj)
     block_t *data = NULL;
     if (size <= 0)
     {
-        data = stream_BlockRemaining (demux->s, 100000000);
-        if (!data )
+        data = stream_Block (demux->s, 1 << 24);
+        if (data == NULL)
             return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list