[libdvdnav-devel] [PATCH 15/33] Deprecate ifoFree_PGCIT()

Jean-Baptiste Kempf jb at videolan.org
Wed Jan 21 17:29:16 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         | 26 +++++++++++++++++++-------
>  2 files changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/src/dvdread/ifo_read.h b/src/dvdread/ifo_read.h
> index c19a4d5..c5ba6e0 100644
> --- a/src/dvdread/ifo_read.h
> +++ b/src/dvdread/ifo_read.h
> @@ -210,7 +210,6 @@ int ifoRead_TXTDT_MGI(ifo_handle_t *);
>   * file which was not read in or which does not exist.
>   */
>  void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
> -void ifoFree_PGCIT(ifo_handle_t *);
>  void ifoFree_VTS_TMAPT(ifo_handle_t *);
>  
>  /**
> @@ -220,6 +219,7 @@ void ifoFree_VTS_TMAPT(ifo_handle_t *);
>   */
>  void ifoFree_C_ADT(ifo_handle_t *);
>  void ifoFree_FP_PGC(ifo_handle_t *);
> +void ifoFree_PGCIT(ifo_handle_t *);
>  void ifoFree_PGCI_UT(ifo_handle_t *);
>  void ifoFree_PTL_MAIT(ifo_handle_t *);
>  void ifoFree_TITLE_C_ADT(ifo_handle_t *);
> diff --git a/src/ifo_read.c b/src/ifo_read.c
> index ac20a24..ac25fa2 100644
> --- a/src/ifo_read.c
> +++ b/src/ifo_read.c
> @@ -566,7 +566,24 @@ void ifoClose(ifo_handle_t *ifofile) {
>      free(ifofile->first_play_pgc->cell_position);
>    }
>  
> -  ifoFree_PGCIT(ifofile);
> +  if(ifofile->vts_pgcit) {
> +      for(i = 0; i < ifofile->vts_pgcit->nr_of_pgci_srp; i++) {
> +
> +        if(ifofile->vts_pgcit->pgci_srp[i].pgc->command_tbl) {
> +          free(ifofile->vts_pgcit->pgci_srp[i].pgc->command_tbl->pre_cmds);
> +          free(ifofile->vts_pgcit->pgci_srp[i].pgc->command_tbl->post_cmds);
> +          free(ifofile->vts_pgcit->pgci_srp[i].pgc->command_tbl->cell_cmds);
> +          free(ifofile->vts_pgcit->pgci_srp[i].pgc->command_tbl);
> +        }
> +        free(ifofile->vts_pgcit->pgci_srp[i].pgc->program_map);
> +        free(ifofile->vts_pgcit->pgci_srp[i].pgc->cell_playback);
> +        free(ifofile->vts_pgcit->pgci_srp[i].pgc->cell_position);
> +        free(ifofile->vts_pgcit->pgci_srp[i].pgc);
> +      }
> +      free(ifofile->vts_pgcit->pgci_srp);
> +      free(ifofile->vts_pgcit);
> +  }
> +
>    ifoFree_VTS_PTT_SRPT(ifofile);
>    ifoFree_VTS_TMAPT(ifofile);
>  
> @@ -1993,12 +2010,7 @@ static void ifoFree_PGCIT_internal(pgcit_t **pgcit) {
>  }
>  
>  void ifoFree_PGCIT(ifo_handle_t *ifofile) {
> -  if(!ifofile)
> -    return;
> -
> -  if(ifofile->vts_pgcit) {
> -    ifoFree_PGCIT_internal(&ifofile->vts_pgcit);
> -  }
> +  return;
>  }
>  
>  static int find_dup_lut(pgci_lu_t *lu, uint32_t start_byte, int count) {
> -- 
> 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