changeset 33348:62ab329812c9

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.
author reimar
date Sat, 07 May 2011 21:28:56 +0000
parents f60b1fd07712
children 3ab3212fb624
files stream/cache2.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/cache2.c	Sat May 07 21:23:22 2011 +0000
+++ b/stream/cache2.c	Sat May 07 21:28:56 2011 +0000
@@ -255,6 +255,8 @@
 }
 
 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) {
@@ -277,7 +279,8 @@
     case STREAM_CTRL_GET_CURRENT_TIME:
     case STREAM_CTRL_SEEK_TO_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_GET_NUM_CHAPTERS:
@@ -285,7 +288,8 @@
     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;