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
This commit is contained in:
reimar 2011-05-07 21:28:56 +00:00 committed by Uoti Urpala
parent 00ffdc0da6
commit 9149ec5d89
1 changed files with 10 additions and 4 deletions

View File

@ -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;