libbluray | branch: master | John Stebbins <[email protected]> | Wed Nov 23 09:15:36 2011 -0800| [3fca7312f8c162923524152fc32c0fbabf4092a9] | committer: John Stebbins
Fix bd_tell_time It should return the time offset from the beginning of the title instead of from the beginning of the current clip. > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=3fca7312f8c162923524152fc32c0fbabf4092a9 --- src/libbluray/bluray.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c index 0575b37..bd90184 100644 --- a/src/libbluray/bluray.c +++ b/src/libbluray/bluray.c @@ -1006,9 +1006,13 @@ int64_t bd_seek_time(BLURAY *bd, uint64_t tick) uint64_t bd_tell_time(BLURAY *bd) { uint32_t clip_pkt = 0, out_pkt = 0, out_time = 0; + NAV_CLIP *clip; if (bd && bd->title) { - nav_packet_search(bd->title, bd->s_pos / 192, &clip_pkt, &out_pkt, &out_time); + clip = nav_packet_search(bd->title, bd->s_pos / 192, &clip_pkt, &out_pkt, &out_time); + if (clip) { + out_time += clip->start_time; + } } return ((uint64_t)out_time) * 2; _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
