[vlc-commits] archive: fix NULL program counter

Rémi Denis-Courmont git at videolan.org
Sun Nov 1 18:15:38 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov  1 19:14:43 2015 +0200| [024cbe94887fdaf4b6838ace34d073363344f322] | committer: Rémi Denis-Courmont

archive: fix NULL program counter

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

 modules/access/archive/stream.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/access/archive/stream.c b/modules/access/archive/stream.c
index 2d3a6f5..3d70725 100644
--- a/modules/access/archive/stream.c
+++ b/modules/access/archive/stream.c
@@ -34,6 +34,12 @@ struct stream_sys_t
     uint8_t buffer[ARCHIVE_READ_SIZE];
 };
 
+static ssize_t NoRead(stream_t *p_stream, void *buf, size_t len)
+{
+    (void) p_stream; (void) buf; (void) len;
+    return -1;
+}
+
 static int Control(stream_t *p_stream, int i_query, va_list args)
 {
     switch( i_query )
@@ -190,7 +196,7 @@ int StreamOpen(vlc_object_t *p_object)
         return VLC_EGENERIC;
     }
 
-    p_stream->pf_read = NULL;
+    p_stream->pf_read = NoRead;
     p_stream->pf_seek = NULL;
     p_stream->pf_control = Control;
     p_stream->pf_readdir = Browse;



More information about the vlc-commits mailing list