Commit 136942f3 authored by Laurent Aimar's avatar Laurent Aimar

Do not error out on empty rar file.

It avoids trying to play the file.
parent 09d1c6e1
...@@ -93,7 +93,7 @@ static int Open(vlc_object_t *object) ...@@ -93,7 +93,7 @@ static int Open(vlc_object_t *object)
int count; int count;
rar_file_t **files; rar_file_t **files;
const int64_t position = stream_Tell(s->p_source); 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); stream_Seek(s->p_source, position);
msg_Err(s, "Invalid or unsupported RAR archive"); msg_Err(s, "Invalid or unsupported RAR archive");
free(files); free(files);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment