[vlc-commits] Do not error out on empty rar file.

Laurent Aimar git at videolan.org
Tue Jan 10 20:54:13 CET 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan  8 22:09:10 2012 +0100| [136942f307a3fee34c6a9f11353328f264e9027b] | committer: Laurent Aimar

Do not error out on empty rar file.

It avoids trying to play the file.

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

 modules/access/rar/stream.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c
index 9c1b55f..567743c 100644
--- a/modules/access/rar/stream.c
+++ b/modules/access/rar/stream.c
@@ -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);



More information about the vlc-commits mailing list