summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-03 06:53:10 +0200
committerwm4 <wm4@nowhere>2012-08-03 06:53:10 +0200
commita78bb28ed63908ce2e02916dfefc0b0eb0af5807 (patch)
tree380896ad9acc6897616f68b320de8c505920f98f
parentadde96a814b7fcca6f468c89a08fe92ff5f87a4f (diff)
downloadmpv-a78bb28ed63908ce2e02916dfefc0b0eb0af5807.tar.bz2
mpv-a78bb28ed63908ce2e02916dfefc0b0eb0af5807.tar.xz
sub: simplify code by always defining sub_cp
-rw-r--r--cfg-mplayer.h2
-rw-r--r--mplayer.c4
-rw-r--r--sub/ass_mp.c4
-rw-r--r--sub/subreader.c4
4 files changed, 3 insertions, 11 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 9857443aa8..4f776405ef 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -565,9 +565,7 @@ const m_option_t common_opts[] = {
OPT_STRINGLIST("sub", sub_name, 0),
OPT_PATHLIST("sub-paths", sub_paths, 0),
-#ifdef CONFIG_ICONV
{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
-#endif
{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
OPT_MAKE_FLAGS("autosub", sub_auto, 0),
diff --git a/mplayer.c b/mplayer.c
index 3b53e9301e..455926b31c 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -908,11 +908,7 @@ void add_subtitles(struct MPContext *mpctx, char *filename, float fps,
#ifdef CONFIG_ASS
if (opts->ass_enabled) {
-#ifdef CONFIG_ICONV
asst = mp_ass_read_stream(mpctx->ass_library, filename, sub_cp);
-#else
- asst = mp_ass_read_stream(mpctx->ass_library, filename, 0);
-#endif
is_native_ass = asst;
if (!asst) {
subd = sub_read_file(filename, fps, &mpctx->opts);
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index bffc42d7cf..8266f45d2e 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -38,10 +38,6 @@
#include "stream/stream.h"
#include "options.h"
-#ifndef CONFIG_ICONV
-static char *sub_cp = 0;
-#endif
-
ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts)
{
ASS_Track *track = ass_new_track(library);
diff --git a/sub/subreader.c b/sub/subreader.c
index dc40b57c62..2ecc41c346 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -45,9 +45,11 @@
#ifdef CONFIG_ICONV
#include <iconv.h>
-char *sub_cp=NULL;
#endif
+char *sub_cp=NULL;
+
+
int suboverlap_enabled = 1;
// Parameter struct for the format-specific readline functions