summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg-common.h3
-rw-r--r--cfg-mencoder.h2
-rw-r--r--cfg-mplayer.h2
-rw-r--r--mencoder.c4
4 files changed, 6 insertions, 5 deletions
diff --git a/cfg-common.h b/cfg-common.h
index d1670bf742..6b7a48965c 100644
--- a/cfg-common.h
+++ b/cfg-common.h
@@ -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},
diff --git a/cfg-mencoder.h b/cfg-mencoder.h
index c42e5af87b..d064545541 100644
--- a/cfg-mencoder.h
+++ b/cfg-mencoder.h
@@ -76,8 +76,6 @@ static config_t mencoder_opts[]={
/* 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},
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 341a7dfed6..4f519811c2 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -189,8 +189,6 @@ static config_t mplayer_opts[]={
#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},
diff --git a/mencoder.c b/mencoder.c
index 088c77ef6d..d0e01a0bd4 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -382,7 +382,7 @@ if(stream->type==STREAMTYPE_DVD){
}
#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 @@ if(stream->type==STREAMTYPE_DVD){
}
#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);