From 08cbac311d313bbd7b0116bd2dc0a155f45d0584 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Tue, 13 Sep 2016 01:15:14 +0000 Subject: sub: Add SD_CTRL_UPDATE_SPEED --- sub/dec_sub.h | 1 + sub/sd_ass.c | 3 +++ 2 files changed, 4 insertions(+) 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; } -- cgit v1.2.3