MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / NextPgcn

Function NextPgcn

libhb/dvdnav.c:1995–2008  ·  view source on GitHub ↗

* NextPgcn *********************************************************************** * Assumes pgc and cell_cur are correctly set, and sets cell_next to the * cell to be read when we will be done with cell_cur. * Since pg chains can be circularly linked (either from a read error or * deliberately) pgcn_map tracks program chains we've already seen. **********************************************

Source from the content-addressed store, hash-verified

1993 * deliberately) pgcn_map tracks program chains we've already seen.
1994 **********************************************************************/
1995static int NextPgcn( ifo_handle_t *ifo, int pgcn, uint32_t pgcn_map[MAX_PGCN/32] )
1996{
1997 int next_pgcn;
1998 pgc_t *pgc;
1999
2000 pgcn_map[pgcn >> 5] |= (1 << (pgcn & 31));
2001
2002 pgc = ifo->vts_pgcit->pgci_srp[pgcn-1].pgc;
2003 next_pgcn = pgc->next_pgc_nr;
2004 if ( next_pgcn < 1 || next_pgcn >= MAX_PGCN || next_pgcn > ifo->vts_pgcit->nr_of_pgci_srp )
2005 return 0;
2006
2007 return pgcn_map[next_pgcn >> 5] & (1 << (next_pgcn & 31))? 0 : next_pgcn;
2008}
2009
2010/***********************************************************************
2011 * PgcWalkInit

Callers 3

PttDurationFunction · 0.85
hb_dvdnav_title_scanFunction · 0.85
TitleOpenIfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected