From 5de29b860b25bb4ba8b1e02d9b3aee7a81009be0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Feb 2015 21:32:44 +0100 Subject: stream: get rid of remaining uses of the end_pos field Most things stopped using this field for better support of growing files. Go through the trouble to repalce the remaining uses, so it can be removed. Also move the "streaming" field; saves 4 bytes (wow!). --- stream/stream_dvd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'stream/stream_dvd.c') diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 5be70b2d1d..0906796986 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -649,6 +649,10 @@ static int control(stream_t *stream,int cmd,void* arg) *(char**)arg = talloc_strdup(NULL, buffer); return STREAM_OK; } + case STREAM_CTRL_GET_SIZE: + *(int64_t *)arg = + (d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048LL; + return STREAM_OK; } return STREAM_UNSUPPORTED; } @@ -917,7 +921,6 @@ static int open_s(stream_t *stream) stream->fill_buffer = fill_buffer; stream->control = control; stream->close = stream_dvd_close; - stream->end_pos = (int64_t)(d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048; MP_VERBOSE(stream, "DVD start=%d end=%d \n",d->cur_pack,d->cur_pgc->cell_playback[d->last_cell-1].last_sector); stream->priv = (void*)d; return STREAM_OK; -- cgit v1.2.3