From: jstebbins Date: Wed, 25 Jun 2014 16:26:21 +0000 (+0000) Subject: bd: fix long delays caused by updated libbluray X-Git-Tag: 0.10.0~310 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4ac02f9369c94aaa5a8740f66cc088c065cf4c1;p=handbrake bd: fix long delays caused by updated libbluray bd_seek and the new m2ts_filter in libbluray have a bad interaction. So use bd_seek_time instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6221 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/bd.c b/libhb/bd.c index b587a24f0..75f2b138f 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -19,7 +19,7 @@ struct hb_bd_s BLURAY * bd; int title_count; BLURAY_TITLE_INFO ** title_info; - uint64_t pkt_count; + int64_t duration; hb_stream_t * stream; int chapter; int next_chap; @@ -586,7 +586,7 @@ int hb_bd_start( hb_bd_t * d, hb_title_t *title ) { BD_EVENT event; - d->pkt_count = title->block_count; + d->duration = title->duration; // Calling bd_get_event initializes libbluray event queue. bd_select_title( d->bd, d->title_info[title->index - 1]->idx ); @@ -617,9 +617,9 @@ void hb_bd_stop( hb_bd_t * d ) **********************************************************************/ int hb_bd_seek( hb_bd_t * d, float f ) { - uint64_t packet = f * d->pkt_count; + uint64_t pos = f * d->duration; - bd_seek(d->bd, packet * 192); + bd_seek_time(d->bd, pos); d->next_chap = bd_get_current_chapter( d->bd ) + 1; hb_ts_stream_reset(d->stream); return 1;