]> git.sesse.net Git - vlc/blobdiff - modules/access/rar/stream.c
posix: drop support for non-UTF-8 operating systems
[vlc] / modules / access / rar / stream.c
index 3b9aa1357c783295f0f919da3b023677ea1ead04..567743c2224f1508649563620b9d5890311a13b2 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * rar.c: uncompressed RAR stream filter
+ * stream.c: uncompressed RAR stream filter
  *****************************************************************************
  * Copyright (C) 2008-2010 Laurent Aimar
  * $Id$
@@ -93,7 +93,7 @@ static int Open(vlc_object_t *object)
     int count;
     rar_file_t **files;
     const int64_t position = stream_Tell(s->p_source);
-    if (RarParse(s->p_source, &count, &files) || count <= 0) {
+    if (RarParse(s->p_source, &count, &files)) {
         stream_Seek(s->p_source, position);
         msg_Err(s, "Invalid or unsupported RAR archive");
         free(files);
@@ -129,6 +129,7 @@ static int Open(vlc_object_t *object)
         }
         RarFileDelete(f);
     }
+    free(base);
     free(files);
     if (!data)
         return VLC_EGENERIC;