[libdvdnav-devel] [PATCH 16/33] Deprecate ifoFree_VTS_PTT_SRPT()
beandog at gentoo.org
beandog at gentoo.org
Thu Jan 15 21:45:28 CET 2015
From: Steve Dibb <steve.dibb at gmail.com>
---
src/dvdread/ifo_read.h | 2 +-
src/ifo_read.c | 23 ++++++++++-------------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
index c5ba6e0..247ecef 100644
--- a/src/dvdread/ifo_read.h
+++ b/src/dvdread/ifo_read.h
@@ -209,7 +209,6 @@ int ifoRead_TXTDT_MGI(ifo_handle_t *);
* below are safe: they will not mind if you attempt to free part of an IFO
* file which was not read in or which does not exist.
*/
-void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
void ifoFree_VTS_TMAPT(ifo_handle_t *);
/**
@@ -228,6 +227,7 @@ void ifoFree_TT_SRPT(ifo_handle_t *);
void ifoFree_TXTDT_MGI(ifo_handle_t *);
void ifoFree_VOBU_ADMAP(ifo_handle_t *);
void ifoFree_VTS_ATRT(ifo_handle_t *);
+void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
#ifdef __cplusplus
};
diff --git a/src/ifo_read.c b/src/ifo_read.c
index ac25fa2..3d63a45 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -584,7 +584,15 @@ void ifoClose(ifo_handle_t *ifofile) {
free(ifofile->vts_pgcit);
}
- ifoFree_VTS_PTT_SRPT(ifofile);
+ if(ifofile->vts_ptt_srpt) {
+ for(i = 0; i < ifofile->vts_ptt_srpt->nr_of_srpts; i++) {
+ free(ifofile->vts_ptt_srpt->title[i].ptt);
+ }
+ free(ifofile->vts_ptt_srpt->title);
+ free(ifofile->vts_ptt_srpt->ttu_offset);
+ free(ifofile->vts_ptt_srpt);
+ }
+
ifoFree_VTS_TMAPT(ifofile);
if(ifofile->vmgi_mat)
@@ -1372,18 +1380,7 @@ fail:
void ifoFree_VTS_PTT_SRPT(ifo_handle_t *ifofile) {
- if(!ifofile)
- return;
-
- if(ifofile->vts_ptt_srpt) {
- int i;
- for(i = 0; i < ifofile->vts_ptt_srpt->nr_of_srpts; i++)
- free(ifofile->vts_ptt_srpt->title[i].ptt);
- free(ifofile->vts_ptt_srpt->ttu_offset);
- free(ifofile->vts_ptt_srpt->title);
- free(ifofile->vts_ptt_srpt);
- ifofile->vts_ptt_srpt = 0;
- }
+ return;
}
--
2.0.4
More information about the libdvdnav-devel
mailing list