diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-05-07 21:28:56 +0000 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 09:21:50 +0300 |
commit | 9149ec5d89d5ee2f89027691ce0f627fe91fa287 (patch) | |
tree | a857109f076dba2347cf60e201945488fe4ad67d /stream/cache2.c | |
parent | 00ffdc0da63877680c71722c75519be978fadf8b (diff) | |
download | mpv-9149ec5d89d5ee2f89027691ce0f627fe91fa287.tar.bz2 mpv-9149ec5d89d5ee2f89027691ce0f627fe91fa287.tar.xz |
cache2.c: Avoid warnings about discarding volatile
In practice this should not really make a difference, but
the code is not significantly worse and it is more correct.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33435 b3059339-0415-0410-9bf9-f77b7e298cf2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33447 b3059339-0415-0410-9bf9-f77b7e298cf2
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; |