[libdvdnav-devel] [PATCH 03/33] Deprecate ifoFree_VOBU_ADMAP()

Jean-Baptiste Kempf jb at videolan.org
Wed Jan 21 17:28:11 CET 2015


Requires proper deprecation flag.
See the DEPRECATED discussion.

On 15 Jan, beandog at gentoo.org wrote :
> From: Steve Dibb <steve.dibb at gmail.com>
> 
> ---
>  src/dvdread/ifo_read.h |  8 +++++++-
>  src/ifo_read.c         | 12 ++++++------
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
> index 97f4179..e9e5568 100644
> --- a/src/dvdread/ifo_read.h
> +++ b/src/dvdread/ifo_read.h
> @@ -219,10 +219,16 @@ 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_VOBU_ADMAP(ifo_handle_t *);
>  void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
>  void ifoFree_TXTDT_MGI(ifo_handle_t *);
>  
> +/**
> + * Deprecated functions used internally for freeing parsed sections of
> + * the ifo_handle_t structure and the allocated substructures.  These
> + * perform no function -- use ifoFree() only.
> + */
> +void ifoFree_VOBU_ADMAP(ifo_handle_t *);
> +
>  #ifdef __cplusplus
>  };
>  #endif
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index ec6952f..1310911 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -487,7 +487,11 @@ void ifoClose(ifo_handle_t *ifofile) {
>    if(!ifofile)
>      return;
>  
> -  ifoFree_VOBU_ADMAP(ifofile);
> +  if(ifofile->menu_vobu_admap) {
> +    free(ifofile->menu_vobu_admap->vobu_start_sectors);
> +    free(ifofile->menu_vobu_admap);
> +  }
> +
>    ifoFree_TITLE_VOBU_ADMAP(ifofile);
>    ifoFree_C_ADT(ifofile);
>    ifoFree_TITLE_C_ADT(ifofile);
> @@ -1829,11 +1833,7 @@ static void ifoFree_VOBU_ADMAP_internal(vobu_admap_t *vobu_admap) {
>  }
>  
>  void ifoFree_VOBU_ADMAP(ifo_handle_t *ifofile) {
> -  if(!ifofile)
> -    return;
> -
> -  ifoFree_VOBU_ADMAP_internal(ifofile->menu_vobu_admap);
> -  ifofile->menu_vobu_admap = NULL;
> +  return;
>  }
>  
>  void ifoFree_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