[libdvdnav-devel] [PATCH 08/33] Deprecate ifoFree_TXTDT_MGI()
beandog at gentoo.org
beandog at gentoo.org
Thu Jan 15 21:45:20 CET 2015
From: Steve Dibb <steve.dibb at gmail.com>
---
src/dvdread/ifo_read.h | 2 +-
src/ifo_read.c | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
index 44a420c..f5b494b 100644
--- a/src/dvdread/ifo_read.h
+++ b/src/dvdread/ifo_read.h
@@ -217,7 +217,6 @@ void ifoFree_FP_PGC(ifo_handle_t *);
void ifoFree_PGCIT(ifo_handle_t *);
void ifoFree_PGCI_UT(ifo_handle_t *);
void ifoFree_VTS_TMAPT(ifo_handle_t *);
-void ifoFree_TXTDT_MGI(ifo_handle_t *);
/**
* Deprecated functions used internally for freeing parsed sections of
@@ -227,6 +226,7 @@ void ifoFree_TXTDT_MGI(ifo_handle_t *);
void ifoFree_C_ADT(ifo_handle_t *);
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 *);
#ifdef __cplusplus
diff --git a/src/ifo_read.c b/src/ifo_read.c
index f7a3fad..14c06a9 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -507,7 +507,9 @@ void ifoClose(ifo_handle_t *ifofile) {
free(ifofile->vts_c_adt);
}
- ifoFree_TXTDT_MGI(ifofile);
+ if(ifofile->txtdt_mgi)
+ free(ifofile->txtdt_mgi);
+
ifoFree_VTS_ATRT(ifofile);
ifoFree_PTL_MAIT(ifofile);
ifoFree_PGCI_UT(ifofile);
@@ -2317,11 +2319,5 @@ int ifoRead_TXTDT_MGI(ifo_handle_t *ifofile) {
}
void ifoFree_TXTDT_MGI(ifo_handle_t *ifofile) {
- if(!ifofile)
- return;
-
- if(ifofile->txtdt_mgi) {
- free(ifofile->txtdt_mgi);
- ifofile->txtdt_mgi = NULL;
- }
+ return;
}
--
2.0.4
More information about the libdvdnav-devel
mailing list