summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r--stream/stream_dvd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index a45fa4e432..4554b2c2cc 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -372,7 +372,7 @@ static void dvd_close(dvd_priv_t *d)
static int fill_buffer(stream_t *s, char *buf, int len)
{
- off_t pos;
+ int64_t pos;
if (len < 2048)
return -1;
pos = dvd_read_sector(s->priv, buf);
@@ -382,7 +382,7 @@ static int fill_buffer(stream_t *s, char *buf, int len)
return 2048; // full sector
}
-static int seek(stream_t *s, off_t newpos) {
+static int seek(stream_t *s, int64_t newpos) {
s->pos=newpos; // real seek
dvd_seek(s->priv,s->pos/2048);
return 1;
@@ -460,7 +460,7 @@ static int seek_to_chapter(stream_t *stream, ifo_handle_t *vts_file, tt_srpt_t *
dvd_priv_t *d = stream->priv;
ptt_info_t ptt;
pgc_t *pgc;
- off_t pos;
+ int64_t pos;
if(!vts_file || !tt_srpt)
return 0;
@@ -489,7 +489,7 @@ static int seek_to_chapter(stream_t *stream, ifo_handle_t *vts_file, tt_srpt_t *
d->packs_left = -1;
d->angle_seek = 0;
- pos = (off_t) d->cur_pack * 2048;
+ pos = (int64_t) d->cur_pack * 2048;
mp_msg(MSGT_OPEN,MSGL_V,"\r\nSTREAM_DVD, seeked to chapter: %d, cell: %u, pos: %"PRIu64"\n",
chapter, d->cur_pack, pos);
@@ -553,7 +553,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
unsigned int i, j, k, timeunit, ac_time, tmap_sector=0, cell_sector=0, vobu_sector=0;
int t=0;
double tm, duration;
- off_t pos = -1;
+ int64_t pos = -1;
dvd_priv_t *d = stream->priv;
vts_tmapt_t *vts_tmapt = vts_file->vts_tmapt;
@@ -580,7 +580,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
}
}
- pos = ((off_t)cell_sector)<<11;
+ pos = ((int64_t)cell_sector)<<11;
stream_seek(stream, pos);
do {
stream_skip(stream, 2048);
@@ -588,7 +588,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
} while(!t);
tm = dvd_get_current_time(stream, -1);
- pos = ((off_t)tmap_sector)<<11;
+ pos = ((int64_t)tmap_sector)<<11;
stream_seek(stream, pos);
//now get current time in terms of the cell+cell time offset
memset(&d->dsi_pack.dsi_gi.c_eltm, 0, sizeof(dvd_time_t));
@@ -606,7 +606,7 @@ static int dvd_seek_to_time(stream_t *stream, ifo_handle_t *vts_file, double sec
break;
}
vobu_sector = vts_file->vts_vobu_admap->vobu_start_sectors[i-1];
- pos = ((off_t)vobu_sector) << 11;
+ pos = ((int64_t)vobu_sector) << 11;
stream_seek(stream, pos);
return 1;
@@ -1013,8 +1013,8 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
stream->seek = seek;
stream->control = control;
stream->close = stream_dvd_close;
- stream->start_pos = (off_t)d->cur_pack*2048;
- stream->end_pos = (off_t)(d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048;
+ stream->start_pos = (int64_t)d->cur_pack*2048;
+ stream->end_pos = (int64_t)(d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048;
*file_format = DEMUXER_TYPE_MPEG_PS;
mp_msg(MSGT_DVD,MSGL_V,"DVD start=%d end=%d \n",d->cur_pack,d->cur_pgc->cell_playback[d->last_cell-1].last_sector);
stream->priv = (void*)d;