summaryrefslogtreecommitdiffstats
path: root/core/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-29 01:49:20 +0200
committerwm4 <wm4@nowhere>2013-05-30 22:44:18 +0200
commit28116b8a799078b3c6b3b559ed4463669c79cf0e (patch)
tree43e78d552443e08d5250774c01a5da245cd2b50f /core/mplayer.c
parentfd02f0f4d88371c728aff3b4487974118ba4d014 (diff)
downloadmpv-28116b8a799078b3c6b3b559ed4463669c79cf0e.tar.bz2
mpv-28116b8a799078b3c6b3b559ed4463669c79cf0e.tar.xz
sub: remove some global variables
Diffstat (limited to 'core/mplayer.c')
-rw-r--r--core/mplayer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index c596aa8504..c832aa1fcb 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -1056,7 +1056,7 @@ struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename,
// the weird special-cases.
#ifdef CONFIG_ASS
if (opts->ass_enabled) {
- asst = mp_ass_read_stream(mpctx->ass_library, filename, sub_cp);
+ asst = mp_ass_read_stream(mpctx->ass_library, filename, opts->sub_cp);
codec = "ass";
}
if (!asst) {
@@ -1389,7 +1389,7 @@ static mp_osd_msg_t *get_osd_msg(struct MPContext *mpctx)
if (mpctx->osd_visible && now >= mpctx->osd_visible) {
mpctx->osd_visible = 0;
mpctx->osd->progbar_type = -1; // disable
- vo_osd_changed(OSDTYPE_PROGBAR);
+ osd_changed(mpctx->osd, OSDTYPE_PROGBAR);
}
if (mpctx->osd_function_visible && now >= mpctx->osd_function_visible) {
mpctx->osd_function_visible = 0;
@@ -1448,7 +1448,7 @@ void set_osd_bar(struct MPContext *mpctx, int type, const char *name,
mpctx->osd->progbar_type = type;
mpctx->osd->progbar_value = (val - min) / (max - min);
mpctx->osd->progbar_num_stops = 0;
- vo_osd_changed(OSDTYPE_PROGBAR);
+ osd_changed(mpctx->osd, OSDTYPE_PROGBAR);
return;
}
@@ -1465,7 +1465,7 @@ static void update_osd_bar(struct MPContext *mpctx, int type,
float new_value = (val - min) / (max - min);
if (new_value != mpctx->osd->progbar_value) {
mpctx->osd->progbar_value = new_value;
- vo_osd_changed(OSDTYPE_PROGBAR);
+ osd_changed(mpctx->osd, OSDTYPE_PROGBAR);
}
}
}
@@ -1831,6 +1831,7 @@ static void reset_subtitles(struct MPContext *mpctx)
static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
{
+ struct MPOpts *opts = &mpctx->opts;
struct sh_sub *sh_sub = mpctx->sh_sub;
struct demux_stream *d_sub = sh_sub ? sh_sub->ds : NULL;
unsigned char *packet = NULL;
@@ -1843,7 +1844,7 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl)
double video_offset = track->under_timeline ? mpctx->video_offset : 0;
- mpctx->osd->sub_offset = video_offset - sub_delay;
+ mpctx->osd->sub_offset = video_offset - opts->sub_delay;
double curpts_s = refpts_tl - mpctx->osd->sub_offset;
double refpts_s = refpts_tl - video_offset;