Commit beff5a17 authored by hpi1's avatar hpi1

nav_*_search(): make sure returned packet number is not outside of the clip

parent 0c2bd257
- Fix bd_seek() jumping outside of clip/playlist.
- Fix out of array bounds exception in some BD-J menus
2013-05-27: Version 0.6.0
......
......@@ -655,6 +655,9 @@ NAV_CLIP* nav_packet_search(NAV_TITLE *title, uint32_t pkt, uint32_t *clip_pkt,
clip = &title->clip_list.clip[ii];
if (clip->cl != NULL) {
*clip_pkt = clpi_access_point(clip->cl, pkt - pos + clip->start_pkt, 0, 0, out_time);
if (*clip_pkt < clip->start_pkt) {
*clip_pkt = clip->start_pkt;
}
} else {
*clip_pkt = clip->start_pkt;
}
......@@ -730,6 +733,9 @@ NAV_CLIP* nav_time_search(NAV_TITLE *title, uint32_t tick, uint32_t *clip_pkt, u
if (clip->cl != NULL) {
*clip_pkt = clpi_lookup_spn(clip->cl, tick - pos + pi->in_time, 1,
title->pl->play_item[clip->ref].clip[clip->angle].stc_id);
if (*clip_pkt < clip->start_pkt) {
*clip_pkt = clip->start_pkt;
}
} else {
*clip_pkt = clip->start_pkt;
}
......
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