[libdvdnav-devel] [PATCH 06/33] Deprecate ifoFree_TITLE_C_ADT()

Jean-Baptiste Kempf jb at videolan.org
Wed Jan 21 17:28:28 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         | 19 ++++++-------------
>  2 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
> index 48d3f98..44a420c 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_TITLE_C_ADT(ifo_handle_t *);
>  void ifoFree_TXTDT_MGI(ifo_handle_t *);
>  
>  /**
> @@ -226,6 +225,7 @@ void ifoFree_TXTDT_MGI(ifo_handle_t *);
>   * perform no function -- use ifoFree() only.
>   */
>  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_VOBU_ADMAP(ifo_handle_t *);
>  
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index e7486b7..c2613ba 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -502,7 +502,11 @@ void ifoClose(ifo_handle_t *ifofile) {
>      free(ifofile->menu_c_adt);
>    }
>  
> -  ifoFree_TITLE_C_ADT(ifofile);
> +  if(ifofile->vts_c_adt) {
> +    free(ifofile->vts_c_adt->cell_adr_table);
> +    free(ifofile->vts_c_adt);
> +  }
> +
>    ifoFree_TXTDT_MGI(ifofile);
>    ifoFree_VTS_ATRT(ifofile);
>    ifoFree_PTL_MAIT(ifofile);
> @@ -1716,24 +1720,13 @@ static int ifoRead_C_ADT_internal(ifo_handle_t *ifofile,
>  }
>  
>  
> -static void ifoFree_C_ADT_internal(c_adt_t *c_adt) {
> -  if(c_adt) {
> -    free(c_adt->cell_adr_table);
> -    free(c_adt);
> -  }
> -}
> -
>  void ifoFree_C_ADT(ifo_handle_t *ifofile) {
>    if(!ifofile)
>      return;
>  }
>  
>  void ifoFree_TITLE_C_ADT(ifo_handle_t *ifofile) {
> -  if(!ifofile)
> -    return;
> -
> -  ifoFree_C_ADT_internal(ifofile->vts_c_adt);
> -  ifofile->vts_c_adt = NULL;
> +  return;
>  }
>  
>  int ifoRead_TITLE_VOBU_ADMAP(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