[libdvdnav-devel] [PATCH 04/33] Deprecate ifoFree_TITLE_VOBU_ADMAP()
beandog at gentoo.org
beandog at gentoo.org
Thu Jan 15 21:45:16 CET 2015
From: Steve Dibb <steve.dibb at gmail.com>
---
src/dvdread/ifo_read.h | 2 +-
src/ifo_read.c | 17 +++++------------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
index e9e5568..905f89d 100644
--- a/src/dvdread/ifo_read.h
+++ b/src/dvdread/ifo_read.h
@@ -219,7 +219,6 @@ void ifoFree_PGCI_UT(ifo_handle_t *);
void ifoFree_VTS_TMAPT(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 *);
/**
@@ -227,6 +226,7 @@ void ifoFree_TXTDT_MGI(ifo_handle_t *);
* the ifo_handle_t structure and the allocated substructures. These
* perform no function -- use ifoFree() only.
*/
+void ifoFree_TITLE_VOBU_ADMAP(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 1310911..90f6424 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -492,7 +492,11 @@ void ifoClose(ifo_handle_t *ifofile) {
free(ifofile->menu_vobu_admap);
}
- ifoFree_TITLE_VOBU_ADMAP(ifofile);
+ if(ifofile->vts_vobu_admap) {
+ free(ifofile->vts_vobu_admap->vobu_start_sectors);
+ free(ifofile->vts_vobu_admap);
+ }
+
ifoFree_C_ADT(ifofile);
ifoFree_TITLE_C_ADT(ifofile);
ifoFree_TXTDT_MGI(ifofile);
@@ -1824,24 +1828,13 @@ static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile,
return 1;
}
-
-static void ifoFree_VOBU_ADMAP_internal(vobu_admap_t *vobu_admap) {
- if(vobu_admap) {
- free(vobu_admap->vobu_start_sectors);
- free(vobu_admap);
- }
-}
-
void ifoFree_VOBU_ADMAP(ifo_handle_t *ifofile) {
return;
}
void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *ifofile) {
- if(!ifofile)
return;
- ifoFree_VOBU_ADMAP_internal(ifofile->vts_vobu_admap);
- ifofile->vts_vobu_admap = NULL;
}
int ifoRead_PGCIT(ifo_handle_t *ifofile) {
--
2.0.4
More information about the libdvdnav-devel
mailing list