• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

githubのコードからのfolk


Commit MetaInfo

Revision8a27b90685a5a64f4a126b89d217af6d0b9b50ca (tree)
Time2011-02-12 06:38:41
Authorjstebbins <jstebbins@b64f...>
Commiterjstebbins

Log Message

Improve loop detection in dvdnav
Loops in titles of only a single chapter were not being detected.
We now also check the cell number for loops.

git-svn-id: svn://localhost/HandBrake/trunk@3796 b64f7644-9d1e-0410-96f1-a4d463321fa5

Change Summary

Incremental Difference

--- a/libhb/dvd.h
+++ b/libhb/dvd.h
@@ -51,6 +51,7 @@ struct hb_dvdnav_s
5151 int title;
5252 int title_block_count;
5353 int chapter;
54+ int cell;
5455 hb_list_t * list_chapter;
5556 int stopped;
5657 };
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -1345,6 +1345,7 @@ static int hb_dvdnav_start( hb_dvd_t * e, hb_title_t *title, int c )
13451345 d->title = t;
13461346 d->stopped = 0;
13471347 d->chapter = 0;
1348+ d->cell = 0;
13481349 return 1;
13491350 }
13501351
@@ -1471,6 +1472,8 @@ static int hb_dvdnav_seek( hb_dvd_t * e, float f )
14711472 dvdnav_err_to_string(d->dvdnav) );
14721473 return 0;
14731474 }
1475+ d->chapter = 0;
1476+ d->cell = 0;
14741477 return 1;
14751478 }
14761479
@@ -1610,8 +1613,11 @@ static int hb_dvdnav_read( hb_dvd_t * e, hb_buffer_t * b )
16101613 * and update the decoding/displaying accordingly.
16111614 */
16121615 {
1616+ dvdnav_cell_change_event_t * cell_event;
16131617 int tt = 0, pgcn = 0, pgn = 0, c;
16141618
1619+ cell_event = (dvdnav_cell_change_event_t*)b->data;
1620+
16151621 dvdnav_current_title_program(d->dvdnav, &tt, &pgcn, &pgn);
16161622 if (tt != d->title)
16171623 {
@@ -1629,6 +1635,11 @@ static int hb_dvdnav_read( hb_dvd_t * e, hb_buffer_t * b )
16291635 }
16301636 chapter = d->chapter = c;
16311637 }
1638+ else if ( cell_event->cellN <= d->cell )
1639+ {
1640+ return 0;
1641+ }
1642+ d->cell = cell_event->cellN;
16321643 }
16331644 break;
16341645