summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorVladimir Panteleev <git@thecybershadow.net>2016-09-13 01:15:14 +0000
committerwm4 <wm4@nowhere>2016-09-13 09:23:19 +0200
commit08cbac311d313bbd7b0116bd2dc0a155f45d0584 (patch)
tree48d8d833f7375e0b3e6f3af6478adb0c6f561c74 /sub
parent60a0815b4c86f72119d558215518e5707ab664ae (diff)
downloadmpv-08cbac311d313bbd7b0116bd2dc0a155f45d0584.tar.bz2
mpv-08cbac311d313bbd7b0116bd2dc0a155f45d0584.tar.xz
sub: Add SD_CTRL_UPDATE_SPEED
Diffstat (limited to 'sub')
-rw-r--r--sub/dec_sub.h1
-rw-r--r--sub/sd_ass.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h
index 1048bf0ca6..341966a430 100644
--- a/sub/dec_sub.h
+++ b/sub/dec_sub.h
@@ -19,6 +19,7 @@ enum sd_ctrl {
SD_CTRL_GET_RESOLUTION,
SD_CTRL_SET_TOP,
SD_CTRL_SET_VIDEO_DEF_FPS,
+ SD_CTRL_UPDATE_SPEED,
};
struct attachment_list {
diff --git a/sub/sd_ass.c b/sub/sd_ass.c
index 0b807d0302..041b03b999 100644
--- a/sub/sd_ass.c
+++ b/sub/sd_ass.c
@@ -671,6 +671,9 @@ static int control(struct sd *sd, enum sd_ctrl cmd, void *arg)
ctx->video_fps = *(double *)arg;
update_subtitle_speed(sd);
return CONTROL_OK;
+ case SD_CTRL_UPDATE_SPEED:
+ update_subtitle_speed(sd);
+ return CONTROL_OK;
default:
return CONTROL_UNKNOWN;
}