[MPlayer-cvslog] r33603 - trunk/stream/stream_dvd.c
reimar
subversion at mplayerhq.hu
Sun Jun 12 13:10:13 CEST 2011
Author: reimar
Date: Sun Jun 12 13:10:13 2011
New Revision: 33603
Log:
Fix dvd_get_current_time so the cell argument actually has a purpose.
Modified:
trunk/stream/stream_dvd.c
Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c Sun Jun 12 12:56:03 2011 (r33602)
+++ trunk/stream/stream_dvd.c Sun Jun 12 13:10:13 2011 (r33603)
@@ -578,8 +578,8 @@ static double dvd_get_current_time(strea
dvd_priv_t *d = stream->priv;
tm=0;
- if(!cell) cell=d->cur_cell;
- for(i=0; i<d->cur_cell; i++) {
+ if(cell < 0) cell=d->cur_cell;
+ for(i=0; i<cell; i++) {
if(d->cur_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 @@ static int dvd_seek_to_time(stream_t *st
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 @@ static int dvd_seek_to_time(stream_t *st
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 @@ static int control(stream_t *stream,int
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;
More information about the MPlayer-cvslog
mailing list