diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 11:39:06 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 11:39:06 +0300 |
commit | a77e5f07ed513233314c18f3e45490fdfa11f6ba (patch) | |
tree | a369f5e54f1b91729712272f1f73ad3f0e7d7d66 /stream/cache2.c | |
parent | 9caae9b385a6de3f4dae98bebb1be64a997c1472 (diff) | |
parent | 27b88a09c5319deb62221b8cd0ecc14cd1136e4a (diff) | |
download | mpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.bz2 mpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.xz |
Merge branch 'mplayer1_changes'
Diffstat (limited to 'stream/cache2.c')
-rw-r--r-- | stream/cache2.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/stream/cache2.c b/stream/cache2.c index e930d72255..ee1cf47245 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -254,6 +254,8 @@ static int cache_fill(cache_vars_t *s) } static int cache_execute_control(cache_vars_t *s) { + double double_res; + unsigned uint_res; static unsigned last; int quit = s->control == -2; if (quit || !s->stream->control) { @@ -273,18 +275,22 @@ static int cache_execute_control(cache_vars_t *s) { } if (s->control == -1) return 1; switch (s->control) { - case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_SEEK_TO_TIME: + double_res = s->control_double_arg; + case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_GET_ASPECT_RATIO: - s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg); + s->control_res = s->stream->control(s->stream, s->control, &double_res); + s->control_double_arg = double_res; break; case STREAM_CTRL_SEEK_TO_CHAPTER: + case STREAM_CTRL_SET_ANGLE: + uint_res = s->control_uint_arg; case STREAM_CTRL_GET_NUM_CHAPTERS: case STREAM_CTRL_GET_CURRENT_CHAPTER: case STREAM_CTRL_GET_NUM_ANGLES: case STREAM_CTRL_GET_ANGLE: - case STREAM_CTRL_SET_ANGLE: - s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg); + s->control_res = s->stream->control(s->stream, s->control, &uint_res); + s->control_uint_arg = uint_res; break; default: s->control_res = STREAM_UNSUPPORTED; |