]> git.sesse.net Git - vlc/commitdiff
Fixed support for multi-volume archive.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 23 Feb 2012 19:13:39 +0000 (20:13 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 23 Feb 2012 19:18:29 +0000 (20:18 +0100)
09d1c6e1891cdc914d25279aabdd83c13baab227 was not working...

It fixes #6190.

modules/access/rar/rar.c

index 0a6cac4e51bb85d967d8a2edcd33311a716df1eb..d833117db9373e56ab17d7791f9cf6bd4b01ddb8 100644 (file)
@@ -327,7 +327,7 @@ int RarParse(stream_t *s, int *count, rar_file_t ***file)
         }
 
         /* */
-        bool has_next = false;
+        int has_next = 1;
         for (;;) {
             rar_block_t bk;
             int ret;
@@ -350,11 +350,12 @@ int RarParse(stream_t *s, int *count, rar_file_t ***file)
             if (ret)
                 break;
         }
+        if (has_next < 0)
+            has_next = *count > 0 && !(*file)[*count -1]->is_complete;
         if (vol != s)
             stream_Delete(vol);
 
-        if (!has_next || !pattern ||
-            (*count > 0 && !(*file)[*count -1]->is_complete)) {
+        if (!has_next || !pattern) {
             free(volume_mrl);
             return VLC_SUCCESS;
         }