summaryrefslogtreecommitdiffstats
path: root/stream/cache2.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/cache2.c')
-rw-r--r--stream/cache2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index b6bdd10b25..488e453dc6 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -88,6 +88,7 @@ typedef struct {
volatile int control;
volatile unsigned control_uint_arg;
volatile double control_double_arg;
+ volatile struct stream_lang_req control_lang_arg;
volatile int control_res;
volatile double stream_time_length;
volatile double stream_time_pos;
@@ -310,6 +311,9 @@ static int cache_execute_control(cache_vars_t *s) {
s->control_res = s->stream->control(s->stream, s->control, &uint_res);
s->control_uint_arg = uint_res;
break;
+ case STREAM_CTRL_GET_LANG:
+ s->control_res = s->stream->control(s->stream, s->control, (void *)&s->control_lang_arg);
+ break;
default:
s->control_res = STREAM_UNSUPPORTED;
break;
@@ -620,6 +624,8 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) {
case STREAM_CTRL_GET_CURRENT_TIME:
*(double *)arg = s->stream_time_pos;
return s->stream_time_pos != MP_NOPTS_VALUE ? STREAM_OK : STREAM_UNSUPPORTED;
+ case STREAM_CTRL_GET_LANG:
+ s->control_lang_arg = *(struct stream_lang_req *)arg;
case STREAM_CTRL_GET_NUM_CHAPTERS:
case STREAM_CTRL_GET_CURRENT_CHAPTER:
case STREAM_CTRL_GET_ASPECT_RATIO:
@@ -665,6 +671,9 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) {
case STREAM_CTRL_GET_ANGLE:
*(unsigned *)arg = s->control_uint_arg;
break;
+ case STREAM_CTRL_GET_LANG:
+ *(struct stream_lang_req *)arg = s->control_lang_arg;
+ break;
}
return s->control_res;
}