[vlc-commits] access: archive: implicitely call close

Francois Cartegnie git at videolan.org
Thu Jul 31 10:01:44 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 30 17:18:24 2014 +0900| [9ff62a89e3f70686924e39e8710d34c7e9dd84cd] | committer: Francois Cartegnie

access: archive: implicitely call close

Unlike documentation says archive_free
 doesn't call close in every circumstances.

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

 modules/access/archive/access.c |    3 +++
 modules/access/archive/stream.c |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/modules/access/archive/access.c b/modules/access/archive/access.c
index 789d347..667b0eb 100644
--- a/modules/access/archive/access.c
+++ b/modules/access/archive/access.c
@@ -296,7 +296,10 @@ void AccessClose(vlc_object_t *p_object)
     access_sys_t *p_sys = p_access->p_sys;
 
     if (p_sys->p_archive)
+    {
+        archive_read_close(p_sys->p_archive);
         archive_read_free(p_sys->p_archive);
+    }
 
     free(p_sys->psz_uri);
     free(p_sys);
diff --git a/modules/access/archive/stream.c b/modules/access/archive/stream.c
index f39b46e..9fc51f7 100644
--- a/modules/access/archive/stream.c
+++ b/modules/access/archive/stream.c
@@ -217,7 +217,10 @@ void StreamClose(vlc_object_t *object)
     stream_sys_t *p_sys = p_stream->p_sys;
 
     if (p_sys->p_archive)
+    {
+        archive_read_close(p_sys->p_archive);
         archive_read_free(p_sys->p_archive);
+    }
 
     free(p_sys);
 }



More information about the vlc-commits mailing list