diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 07:41:17 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:48:38 +0300 |
commit | 66bd120a3a8c15ee3bd7ce41e7258e8b33925864 (patch) | |
tree | 933be87b7812acd3f93dd17669857ab5d7c1302c /mpcommon.c | |
parent | c0c914effd94324362e4ca70204f1b08783f6121 (diff) | |
download | mpv-66bd120a3a8c15ee3bd7ce41e7258e8b33925864.tar.bz2 mpv-66bd120a3a8c15ee3bd7ce41e7258e8b33925864.tar.xz |
Move dvdsub_id to options struct
Name the field "sub_id" as it's not specific to DVD subs.
Remove some other unused extern declarations together with dvdsub_id
from demux_mkv.c and demux_lavf.c.
Diffstat (limited to 'mpcommon.c')
-rw-r--r-- | mpcommon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mpcommon.c b/mpcommon.c index 661468b1da..f0a2d0e1a3 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -1,4 +1,5 @@ #include <stdlib.h> +#include "options.h" #include "stream/stream.h" #include "libmpdemux/demuxer.h" #include "libmpdemux/stheader.h" @@ -26,6 +27,7 @@ subtitle* vo_sub_last = NULL; void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) { + struct MPOpts *opts = sh_video->opts; unsigned char *packet=NULL; int len; char type = d_dvdsub->sh ? ((sh_sub_t *)d_dvdsub->sh)->type : 'v'; @@ -56,7 +58,7 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) } // DVD sub: - if (vo_spudec && (vobsub_id >= 0 || (dvdsub_id >= 0 && type == 'v'))) { + if (vo_spudec && (vobsub_id >= 0 || (opts->sub_id >= 0 && type == 'v'))) { int timestamp; current_module = "spudec"; spudec_heartbeat(vo_spudec, 90000*sh_video->timer); @@ -100,7 +102,8 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) if (spudec_changed(vo_spudec)) vo_osd_changed(OSDTYPE_SPU); - } else if (dvdsub_id >= 0 && (type == 't' || type == 'm' || type == 'a')) { + } else if (opts->sub_id >= 0 + && (type == 't' || type == 'm' || type == 'a')) { double curpts = sh_video->pts + sub_delay; double endpts; vo_sub = &subs; |