[vlc-commits] imem: return an error when file 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:37:37 2015 +0300| [26a7c80c379ebe76f7ece987dab5b76e40750c1c] | committer: Rémi Denis-Courmont

imem: return an error when file is unknown

Due to backward command line compatibility, zero size is not possible
with the old imem. Consider using the proper LibVLC API.

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

 modules/access/imem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/imem.c b/modules/access/imem.c
index 5b4b056..bb5117a 100644
--- a/modules/access/imem.c
+++ b/modules/access/imem.c
@@ -346,7 +346,7 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
     case ACCESS_GET_SIZE: {
         uint64_t *s = va_arg(args, uint64_t *);
         *s = var_InheritInteger(access, "imem-size");
-        return VLC_SUCCESS;
+        return *s ? VLC_SUCCESS : VLC_EGENERIC;
     }
     case ACCESS_GET_PTS_DELAY: {
         int64_t *delay = va_arg(args, int64_t *);



More information about the vlc-commits mailing list