[vlc-commits] gme: reject streams with unknown size
Rémi Denis-Courmont
git at videolan.org
Tue Nov 28 18:51:30 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 28 19:30:46 2017 +0200| [bd372c9ebf4eda841c8c6397d3875e2eb39c63cf] | committer: Rémi Denis-Courmont
gme: reject streams with unknown size
They never worked in this context (they would be treated as 0 bytes).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd372c9ebf4eda841c8c6397d3875e2eb39c63cf
---
modules/demux/gme.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index ea87412c66..b144ca6c05 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -70,8 +70,10 @@ static gme_err_t ReaderBlock (void *, void *, int);
static int Open (vlc_object_t *obj)
{
demux_t *demux = (demux_t *)obj;
+ uint64_t size;
- int64_t size = stream_Size (demux->s);
+ if (vlc_stream_GetSize(demux->s, &size))
+ return VLC_EGENERIC;
if (size > LONG_MAX /* too big for GME */)
return VLC_EGENERIC;
More information about the vlc-commits
mailing list