[MPlayer-dev-eng] [PATCH] matroska chapter seeking

Nico Sabbi nsabbi at email.it
Tue Jul 18 16:29:45 CEST 2006


Evgeniy Stepanov wrote:
> 3rd try.
> * absolute seeking (not binded to any key by default)
> * -quit-after-last-chapter option (someone suggest a better name please)
>   
> ------------------------------------------------------------------------
>
>  
>   

sorry to bother you again, but IMO moving the code below to a
demuxer_add_chapter(name, start) (including the alloc() code)
in demuxer.c would be the best implementation :)

> -  if (mkv_d->chapters)
> +  if (demuxer->chapters)
>      {
>        ebml_read_skip (s, NULL);
>        return 0;
> @@ -1359,17 +1352,18 @@
>                    case MATROSKA_ID_CHAPTERATOM:
>                      {
>                        uint64_t len, start=0, end=0;
> +                      char* name = 0;
>                        int i;
>  
>                        len = ebml_read_length (s, &i);
>                        l = len + i;
>  
> -                      if (mkv_d->chapters == NULL)
> -                        mkv_d->chapters = malloc (32*sizeof(*mkv_d->chapters));
> -                      else if (!(mkv_d->num_chapters % 32))
> -                        mkv_d->chapters = realloc (mkv_d->chapters,
> -                                                   (mkv_d->num_chapters + 32)
> -                                                   * sizeof(*mkv_d->chapters));
> +                      if (demuxer->chapters == NULL)
> +                        demuxer->chapters = malloc (32*sizeof(*demuxer->chapters));
> +                      else if (!(demuxer->num_chapters % 32))
> +                        demuxer->chapters = realloc (demuxer->chapters,
> +                                                   (demuxer->num_chapters + 32)
> +                                                   * sizeof(*demuxer->chapters));
>  
>   

Thanks,
    Nico
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Crea il tuo sito web dinamico con ASP e ACCESS - VideoCorso professionale direttamente nel tuo computer. Trucchi e segreti
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5143&d=18-7



More information about the MPlayer-dev-eng mailing list