[vlc-commits] commit: Reset the stream position when rar stream_filter failed to load. ( Laurent Aimar )

git at videolan.org git at videolan.org
Fri Nov 12 03:00:12 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov  9 19:28:43 2010 +0100| [21bb2451d59a2346d44166825faf170a98d27d81] | committer: Laurent Aimar 

Reset the stream position when rar stream_filter failed to load.

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

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

diff --git a/modules/access/rar/stream.c b/modules/access/rar/stream.c
index e7c92a4..eaa0a11 100644
--- a/modules/access/rar/stream.c
+++ b/modules/access/rar/stream.c
@@ -92,7 +92,9 @@ 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) {
+        stream_Seek(s->p_source, position);
         msg_Err(s, "Invalid or unsupported RAR archive");
         free(files);
         return VLC_EGENERIC;



More information about the vlc-commits mailing list