[MPlayer-cvslog] r33789 - in trunk: cfg-common.h cfg-mplayer.h mencoder.c

reimar subversion at mplayerhq.hu
Fri Jul 1 19:43:40 CEST 2011


Author: reimar
Date: Fri Jul  1 19:43:40 2011
New Revision: 33789

Log:
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.

Modified:
   trunk/cfg-common.h
   trunk/cfg-mplayer.h
   trunk/mencoder.c

Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h	Fri Jul  1 17:17:53 2011	(r33788)
+++ trunk/cfg-common.h	Fri Jul  1 19:43:40 2011	(r33789)
@@ -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 @@ const m_option_t common_opts[] = {
     {"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

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	Fri Jul  1 17:17:53 2011	(r33788)
+++ trunk/cfg-mplayer.h	Fri Jul  1 19:43:40 2011	(r33789)
@@ -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 @@ const m_option_t mplayer_opts[]={
     {"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},

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Fri Jul  1 17:17:53 2011	(r33788)
+++ trunk/mencoder.c	Fri Jul  1 19:43:40 2011	(r33789)
@@ -777,6 +777,8 @@ if(sh_audio && (out_audio_codec || seek_
     }
   }
 
+  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 @@ if (vobsub_out) {
     }
 #endif
 }
-else {
+else if (!vo_spudec) {
 init_vo_spudec(stream, sh_video, d_dvdsub ? d_dvdsub->sh : NULL);
 }
 


More information about the MPlayer-cvslog mailing list