summaryrefslogtreecommitdiffstats
path: root/stream/cache2.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-03 20:11:46 +0200
committerwm4 <wm4@nowhere>2013-05-05 18:44:24 +0200
commit4d14a42997154861e541c34d25a26d272fcbd152 (patch)
tree5ec5d4f948ebcbe72e6275a37c2f85ddad44bc2f /stream/cache2.c
parent36444332249e28cc053df83b9a81da492cfca079 (diff)
downloadmpv-4d14a42997154861e541c34d25a26d272fcbd152.tar.bz2
mpv-4d14a42997154861e541c34d25a26d272fcbd152.tar.xz
stream: add start time reporting
Will be needed to override the demuxer's start time reporting. We could be lazy and special-case it since the result is always 0 for the streams that care, but doing it properly is better.
Diffstat (limited to 'stream/cache2.c')
-rw-r--r--stream/cache2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index 6c11ec9812..705ba15014 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -300,6 +300,7 @@ static int cache_execute_control(cache_vars_t *s) {
double_res = s->control_double_arg;
case STREAM_CTRL_GET_CURRENT_TIME:
case STREAM_CTRL_GET_ASPECT_RATIO:
+ case STREAM_CTRL_GET_START_TIME:
s->control_res = s->stream->control(s->stream, s->control, &double_res);
s->control_double_arg = double_res;
break;
@@ -663,6 +664,7 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) {
case STREAM_CTRL_GET_ANGLE:
case STREAM_CTRL_GET_SIZE:
case STREAM_CTRL_MANAGES_TIMELINE:
+ case STREAM_CTRL_GET_START_TIME:
case -2:
s->control = cmd;
break;
@@ -695,6 +697,7 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) {
case STREAM_CTRL_GET_TIME_LENGTH:
case STREAM_CTRL_GET_CURRENT_TIME:
case STREAM_CTRL_GET_ASPECT_RATIO:
+ case STREAM_CTRL_GET_START_TIME:
*(double *)arg = s->control_double_arg;
break;
case STREAM_CTRL_GET_NUM_TITLES: