changeset 5626:b7b40e65c070

-sb option re-added (noticed by Alexandre Oliva <oliva@lsd.ic.unicamp.br>)
author arpi
date Mon, 15 Apr 2002 00:36:21 +0000
parents 5fee21c3720c
children a05efac12472
files cfg-common.h cfg-mencoder.h cfg-mplayer.h mencoder.c
diffstat 4 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common.h	Mon Apr 15 00:08:22 2002 +0000
+++ b/cfg-common.h	Mon Apr 15 00:36:21 2002 +0000
@@ -38,6 +38,9 @@
 	{"csslib", "MPlayer was compiled WITHOUT libcss support!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif
 
+	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+	{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
+
 // ------------------------- demuxer options --------------------
 
 	{"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1, NULL},
--- a/cfg-mencoder.h	Mon Apr 15 00:08:22 2002 +0000
+++ b/cfg-mencoder.h	Mon Apr 15 00:36:21 2002 +0000
@@ -76,8 +76,6 @@
 	/* name, pointer, type, flags, min, max */
 	{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, /* this must be the first!!! */
 
-//	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
-	{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
 	{"endpos", parse_end_at, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
 	
 	{"ofps", &force_ofps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL},
--- a/cfg-mplayer.h	Mon Apr 15 00:08:22 2002 +0000
+++ b/cfg-mplayer.h	Mon Apr 15 00:36:21 2002 +0000
@@ -189,8 +189,6 @@
 #endif
 //	{"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 //	{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
-	{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
 	{"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 	{"noloop", &loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},
 	{"loop", &loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, NULL},
--- a/mencoder.c	Mon Apr 15 00:08:22 2002 +0000
+++ b/mencoder.c	Mon Apr 15 00:36:21 2002 +0000
@@ -382,7 +382,7 @@
 }
 #endif
 
-  if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0);
+  stream->start_pos+=seek_to_byte;
 
 #ifdef HAVE_LIBCSS
 //  current_module="libcss";
@@ -403,6 +403,8 @@
   }
 #endif
 
+  if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024,0,0);
+
   if(!has_audio || demuxer2) audio_id=-2; /* do NOT read audio packets... */
 
   //demuxer=demux_open(stream,file_format,video_id,audio_id,dvdsub_id);