summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-06 21:32:44 +0100
committerwm4 <wm4@nowhere>2015-02-06 21:43:52 +0100
commit5de29b860b25bb4ba8b1e02d9b3aee7a81009be0 (patch)
tree48e2b98f35ceb2aecef8a0706e921e3219b6994d /stream/stream_bluray.c
parent347cf972310c0de5565015190c1cd6e7d3d3d30c (diff)
downloadmpv-5de29b860b25bb4ba8b1e02d9b3aee7a81009be0.tar.bz2
mpv-5de29b860b25bb4ba8b1e02d9b3aee7a81009be0.tar.xz
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!).
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r--stream/stream_bluray.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index ebbdf63a3e..04efed6e51 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -600,6 +600,9 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
fill_next_event(s, ev);
return STREAM_OK;
}
+ case STREAM_CTRL_GET_SIZE:
+ *(int64_t *)arg = bd_get_title_size(b->bd);
+ return STREAM_OK;
default:
break;
}
@@ -794,7 +797,6 @@ static int bluray_stream_open(stream_t *s)
s->close = bluray_stream_close;
s->control = bluray_stream_control;
s->type = STREAMTYPE_BLURAY;
- s->end_pos = bd_get_title_size(bd);
s->sector_size = BLURAY_SECTOR_SIZE;
s->priv = b;
s->demuxer = "+disc";