summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-22 02:09:52 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commitcfa45c40dc0cfe44b699029168b62d4d3e16c288 (patch)
tree5a80d3b6e82711a5816c509e803c029b93342892 /core/command.c
parent1bfae45a88ac7c24b74a6f7ca6eb4aa27d20c653 (diff)
downloadmpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.bz2
mpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.xz
sub: add demux_libass wrapper, drop old hacks
demux_libass.c allows us to make subtitle format detection part of the normal file loading process. libass has no probe function, but trying to load the start of a file (the first 4 KB) is good enough. Hope that libass can even handle random binary input gracefully without printing stupid log messages, and that the libass parser doesn't accept too many non-ASS files as input. This doesn't handle the -subcp option correctly yet. This will be fixed later.
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/command.c b/core/command.c
index 4da0653425..c39bb3c16d 100644
--- a/core/command.c
+++ b/core/command.c
@@ -2281,7 +2281,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
case MP_CMD_SUB_ADD:
if (sh_video) {
- mp_add_subtitles(mpctx, cmd->args[0].v.s, sh_video->fps, 0);
+ mp_add_subtitles(mpctx, cmd->args[0].v.s, 0);
}
break;
@@ -2296,8 +2296,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
struct track *sub = mp_track_by_tid(mpctx, STREAM_SUB, cmd->args[0].v.i);
if (sh_video && sub && sub->is_external && sub->external_filename)
{
- struct track *nsub = mp_add_subtitles(mpctx, sub->external_filename,
- sh_video->fps, 0);
+ struct track *nsub = mp_add_subtitles(mpctx, sub->external_filename, 0);
if (nsub) {
mp_remove_track(mpctx, sub);
mp_switch_track(mpctx, nsub->type, nsub);