[DVDnav-discuss] [PATCH] "dvdnav_jump_to_sector" as an alternative to "dvdnav_time_search" (REV 1: handle delay when reading directly off disc)

gnosygnu gnosygnu at gmail.com
Thu Nov 17 06:11:23 CET 2011


> I was just going over the new patch and saw this code:
> +    /* HACK: ifo->vts_tmapt is NULL
> +     * get ifo again by calling ifoOpen
> +     * (ifoOpen will return an ifo with a timeMap)
> +     * cache this ifo by overwriting this->vm->vtsi */
> +    if (tmapt == NULL) {
> +      ifo = ifoOpen(this->vm->dvd, vts_idx);
> +      this->vm->vtsi = ifo;
> +      tmapt = ifo->vts_tmapt;
> +      if (tmapt == NULL) return NULL;
> +    }
>
> This is probably why there is a #include <dvdread/ifo_read.h>.
Yup. Exactly. :)

> Any reason why you feel you have to re-open the IFO? It seems like
> overkill or that you are workaround a bug elsewhere because vts_tmapt
> is NULL.
I admit it is overkill. I only did it because the existing ifo's time
map reference is null. Specifically "this->vm->vtsi->vts_tmapt" was
null. In contrast the admap pointer was not null:
"this->vm->vtsi->menu_vobu_admap".

I didn't know why tmap was null but I discovered if I call "ifo =
ifoOpen(this->vm->dvd, vts_idx);" I get back an ifo with a time map
reference that was valid.

I admit this was kludgy. I put a note in the code, but I should
probably have highlighted it better. Please let me know if there's
another way I can get back a valid time map reference without having
to reopen the ifo file. I'd be happy to change it.

As always, thanks.


> E
>
> --
> Erik Hovland
> erik at hovland.org
> http://hovland.org/
> _______________________________________________
> DVDnav-discuss mailing list
> DVDnav-discuss at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
>


More information about the DVDnav-discuss mailing list