[libdvdnav-devel] [PATCH 05/33] Deprecate ifoFree_C_ADT()

Jean-Baptiste Kempf jb at videolan.org
Wed Jan 21 17:28:22 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         | 9 +++++----
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
> index 905f89d..48d3f98 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_C_ADT(ifo_handle_t *);
>  void ifoFree_TITLE_C_ADT(ifo_handle_t *);
>  void ifoFree_TXTDT_MGI(ifo_handle_t *);
>  
> @@ -226,6 +225,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_C_ADT(ifo_handle_t *);
>  void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
>  void ifoFree_VOBU_ADMAP(ifo_handle_t *);
>  
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index 90f6424..e7486b7 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -497,7 +497,11 @@ void ifoClose(ifo_handle_t *ifofile) {
>      free(ifofile->vts_vobu_admap);
>    }
>  
> -  ifoFree_C_ADT(ifofile);
> +  if(ifofile->menu_c_adt) {
> +    free(ifofile->menu_c_adt->cell_adr_table);
> +    free(ifofile->menu_c_adt);
> +  }
> +
>    ifoFree_TITLE_C_ADT(ifofile);
>    ifoFree_TXTDT_MGI(ifofile);
>    ifoFree_VTS_ATRT(ifofile);
> @@ -1722,9 +1726,6 @@ static void ifoFree_C_ADT_internal(c_adt_t *c_adt) {
>  void ifoFree_C_ADT(ifo_handle_t *ifofile) {
>    if(!ifofile)
>      return;
> -
> -  ifoFree_C_ADT_internal(ifofile->menu_c_adt);
> -  ifofile->menu_c_adt = NULL;
>  }
>  
>  void ifoFree_TITLE_C_ADT(ifo_handle_t *ifofile) {
> -- 
> 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