Commit 21bb2451 authored by Laurent Aimar's avatar Laurent Aimar

Reset the stream position when rar stream_filter failed to load.

parent 888aed94
...@@ -92,7 +92,9 @@ static int Open(vlc_object_t *object) ...@@ -92,7 +92,9 @@ 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);
if (RarParse(s->p_source, &count, &files) || count <= 0) { if (RarParse(s->p_source, &count, &files) || count <= 0) {
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);
return VLC_EGENERIC; return VLC_EGENERIC;
......
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