[libdvdnav-devel] [PATCH 16/33] Deprecate ifoFree_VTS_PTT_SRPT()
Jean-Baptiste Kempf
jb at videolan.org
Wed Jan 21 17:29:23 CET 2015
idem.
On 15 Jan, beandog at gentoo.org wrote :
> 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
>
> _______________________________________________
> libdvdnav-devel mailing list
> libdvdnav-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvdnav-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the libdvdnav-devel
mailing list