summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpcommon.c')
-rw-r--r--mpcommon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mpcommon.c b/mpcommon.c
index 34ab976fd2..4c6c780a7b 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -1,4 +1,6 @@
#include <stdlib.h>
+#include "mpcommon.h"
+#include "options.h"
#include "stream/stream.h"
#include "libmpdemux/demuxer.h"
#include "libmpdemux/stheader.h"
@@ -77,6 +79,7 @@ void print_version(const char* name)
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';
@@ -107,8 +110,7 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset)
}
// DVD sub:
- if (vo_config_count && 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);
@@ -152,7 +154,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;