summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-06-12 11:10:13 +0000
committerUoti Urpala <uau@mplayer2.org>2011-07-06 13:01:07 +0300
commitd84c42b09f710afd09fe5a0910d6352fc1c11207 (patch)
tree4a42137908936fcbe8dc9dc0fb11a35d74d2df62
parent81c227d221b959329dc67121146a1c1960d2e602 (diff)
downloadmpv-d84c42b09f710afd09fe5a0910d6352fc1c11207.tar.bz2
mpv-d84c42b09f710afd09fe5a0910d6352fc1c11207.tar.xz
stream_dvd: fix dvd_get_current_time()
Fix dvd_get_current_time so the cell argument actually has a purpose. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33603 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/stream_dvd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index f257ab78bd..2121e78ccc 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -534,8 +534,8 @@ static double dvd_get_current_time(stream_t *stream, int cell)
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
)
@@ -585,7 +585,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
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);
@@ -594,7 +594,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
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;
@@ -645,7 +645,7 @@ static int control(stream_t *stream,int cmd,void* arg)
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;