[libbluray-devel] nav_clip_time_search: make sure returned value is in clip range

hpi1 git at videolan.org
Fri Jun 3 09:57:42 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Jun  1 12:02:57 2016 +0300| [1570cb44d64cdaa22a026019d38fd3c0c0a5d2ea] | committer: hpi1

nav_clip_time_search: make sure returned value is in clip range

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=1570cb44d64cdaa22a026019d38fd3c0c0a5d2ea
---

 src/libbluray/bdnav/navigation.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index 6bc31c7..1ffb090 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -902,6 +902,10 @@ void nav_clip_time_search(NAV_CLIP *clip, uint32_t tick, uint32_t *clip_pkt, uin
         if (clip->cl != NULL) {
             *clip_pkt = clpi_lookup_spn(clip->cl, tick, 1,
                clip->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;
         }



More information about the libbluray-devel mailing list