Commit fd8ba192 authored by john's avatar john

Fix chapter lookup problems

Both looking up the current chapter and looking up the
position of a chapter were broken.
parent 228c63d1
......@@ -542,6 +542,13 @@ uint32_t nav_chapter_get_current(NAV_CLIP *clip, uint32_t pkt)
title = clip->title;
for (ii = 0; ii < title->chap_list.count; ii++) {
mark = &title->chap_list.mark[ii];
if (mark->clip_ref > clip->ref)
{
if (ii)
return ii-1;
else
return 0;
}
if (mark->clip_ref == clip->ref && mark->clip_pkt <= pkt) {
if ( ii == title->chap_list.count - 1 ) {
return ii;
......
......@@ -102,7 +102,7 @@ struct bluray {
unsigned request_angle;
/* chapter tracking */
uint32_t next_chapter_start;
uint64_t next_chapter_start;
/* aacs */
#ifdef DLOPEN_CRYPTO_LIBS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment