[libdvdnav-devel] [PATCH 09/33] Deprecate ifoFree_VTS_ATRT()

beandog at gentoo.org beandog at gentoo.org
Thu Jan 15 21:45:21 CET 2015


From: Steve Dibb <steve.dibb at gmail.com>

---
 src/dvdread/ifo_read.h |  2 +-
 src/ifo_read.c         | 17 +++++++----------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
index f5b494b..4cd007f 100644
--- a/src/dvdread/ifo_read.h
+++ b/src/dvdread/ifo_read.h
@@ -210,7 +210,6 @@ int ifoRead_TXTDT_MGI(ifo_handle_t *);
  * file which was not read in or which does not exist.
  */
 void ifoFree_PTL_MAIT(ifo_handle_t *);
-void ifoFree_VTS_ATRT(ifo_handle_t *);
 void ifoFree_TT_SRPT(ifo_handle_t *);
 void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
 void ifoFree_FP_PGC(ifo_handle_t *);
@@ -228,6 +227,7 @@ void ifoFree_TITLE_C_ADT(ifo_handle_t *);
 void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
 void ifoFree_TXTDT_MGI(ifo_handle_t *);
 void ifoFree_VOBU_ADMAP(ifo_handle_t *);
+void ifoFree_VTS_ATRT(ifo_handle_t *);
 
 #ifdef __cplusplus
 };
diff --git a/src/ifo_read.c b/src/ifo_read.c
index 14c06a9..c6a6599 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -510,7 +510,12 @@ void ifoClose(ifo_handle_t *ifofile) {
   if(ifofile->txtdt_mgi)
     free(ifofile->txtdt_mgi);
 
-  ifoFree_VTS_ATRT(ifofile);
+  if(ifofile->vts_atrt) {
+    free(ifofile->vts_atrt->vts);
+    free(ifofile->vts_atrt->vts_atrt_offsets);
+    free(ifofile->vts_atrt);
+  }
+
   ifoFree_PTL_MAIT(ifofile);
   ifoFree_PGCI_UT(ifofile);
   ifoFree_TT_SRPT(ifofile);
@@ -2272,15 +2277,7 @@ int ifoRead_VTS_ATRT(ifo_handle_t *ifofile) {
 
 
 void ifoFree_VTS_ATRT(ifo_handle_t *ifofile) {
-  if(!ifofile)
-    return;
-
-  if(ifofile->vts_atrt) {
-    free(ifofile->vts_atrt->vts);
-    free(ifofile->vts_atrt->vts_atrt_offsets);
-    free(ifofile->vts_atrt);
-    ifofile->vts_atrt = NULL;
-  }
+  return;
 }
 
 
-- 
2.0.4



More information about the libdvdnav-devel mailing list