# HG changeset patch # User reimar # Date 1309542220 0 # Node ID 09bdaa0c82b347d5cdf317801bbbf739bbb7ed12 # Parent e41218a2fe369e6ced86c5f69f91251754bd7514 Make vobsub options available in mencoder, though with my test file it seems to not work quite right but stops adding subtitles after some minutes. diff -r e41218a2fe36 -r 09bdaa0c82b3 cfg-common.h --- a/cfg-common.h Fri Jul 01 15:17:53 2011 +0000 +++ b/cfg-common.h Fri Jul 01 17:43:40 2011 +0000 @@ -34,6 +34,7 @@ #include "libmpdemux/mf.h" #include "libpostproc/postprocess.h" #include "sub/sub.h" +#include "sub/unrar_exec.h" #include "osdep/priority.h" #include "stream/cdd.h" #include "stream/network.h" @@ -589,6 +590,11 @@ {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, +#ifdef CONFIG_UNRAR_EXEC + {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, +#endif // specify IFO file for VOBSUB subtitle {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL}, // enable Closed Captioning display diff -r e41218a2fe36 -r 09bdaa0c82b3 cfg-mplayer.h --- a/cfg-mplayer.h Fri Jul 01 15:17:53 2011 +0000 +++ b/cfg-mplayer.h Fri Jul 01 17:43:40 2011 +0000 @@ -35,7 +35,6 @@ #include "libvo/vo_fbdev.h" #include "libvo/vo_zr.h" #include "mp_fifo.h" -#include "sub/unrar_exec.h" const m_option_t vd_conf[]={ @@ -256,13 +255,6 @@ {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* CONFIG_MENU */ - // these should be moved to -common, and supported in MEncoder - {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, - {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL}, -#ifdef CONFIG_UNRAR_EXEC - {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL}, -#endif - {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL}, diff -r e41218a2fe36 -r 09bdaa0c82b3 mencoder.c --- a/mencoder.c Fri Jul 01 15:17:53 2011 +0000 +++ b/mencoder.c Fri Jul 01 17:43:40 2011 +0000 @@ -777,6 +777,8 @@ } } + vo_vobsub = vobsub_open(vobsub_name, spudec_ifo, 1, &vo_spudec); + // set up video encoder: if (!curfile) { // curfile is non zero when a second file is opened @@ -806,7 +808,7 @@ } #endif } -else { +else if (!vo_spudec) { init_vo_spudec(stream, sh_video, d_dvdsub ? d_dvdsub->sh : NULL); }