# HG changeset patch # User reimar # Date 1307877013 0 # Node ID c80d57ec577b244d8005d584a3a96e6473f2b321 # Parent 30e54bd66d39a344ab866543c48cb73f17b26bb8 Fix dvd_get_current_time so the cell argument actually has a purpose. diff -r 30e54bd66d39 -r c80d57ec577b stream/stream_dvd.c --- a/stream/stream_dvd.c Sun Jun 12 10:56:03 2011 +0000 +++ b/stream/stream_dvd.c Sun Jun 12 11:10:13 2011 +0000 @@ -578,8 +578,8 @@ dvd_priv_t *d = stream->priv; tm=0; - if(!cell) cell=d->cur_cell; - for(i=0; icur_cell; i++) { + if(cell < 0) cell=d->cur_cell; + for(i=0; icur_pgc->cell_playback[i].block_type == BLOCK_TYPE_ANGLE_BLOCK && d->cur_pgc->cell_playback[i].block_mode != BLOCK_MODE_FIRST_CELL ) @@ -629,7 +629,7 @@ stream_skip(stream, 2048); t = mp_dvdtimetomsec(&d->dsi_pack.dsi_gi.c_eltm); } while(!t); - tm = dvd_get_current_time(stream, 0); + tm = dvd_get_current_time(stream, -1); pos = ((off_t)tmap_sector)<<11; stream_seek(stream, pos); @@ -638,7 +638,7 @@ while(tm <= sec) { if(!stream_skip(stream, 2048)) break; - tm = dvd_get_current_time(stream, 0); + tm = dvd_get_current_time(stream, -1); }; tmap_sector = stream->pos >> 11; @@ -689,7 +689,7 @@ case STREAM_CTRL_GET_CURRENT_TIME: { double tm; - tm = dvd_get_current_time(stream, 0); + tm = dvd_get_current_time(stream, -1); if(tm != -1) { *((double *)arg) = tm; return 1;