summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-13 02:44:08 +0100
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-01-25 17:00:08 +0900
commit8c54b56f4339ae897e90a8f75a821d4b29a9d210 (patch)
tree809392ea3afcf3a103848d6afc9a3f361074c027 /player
parenta44ffb729b06950c08e45b4ad9522e0977751c85 (diff)
downloadmpv-8c54b56f4339ae897e90a8f75a821d4b29a9d210.tar.bz2
mpv-8c54b56f4339ae897e90a8f75a821d4b29a9d210.tar.xz
player: fix crash wtih --secondary-sid
Fises #1463.
Diffstat (limited to 'player')
-rw-r--r--player/sub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/sub.c b/player/sub.c
index a409647e35..637bf19d48 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -200,17 +200,18 @@ void get_osd_sub_state(struct MPContext *mpctx, int order,
struct track *track = mpctx->current_track[order][STREAM_SUB];
struct dec_sub *dec_sub = mpctx->d_sub[order];
int obj = order ? OSDTYPE_SUB2 : OSDTYPE_SUB;
+ bool textsub = dec_sub && sub_has_get_text(dec_sub);
struct osd_sub_state state = {
.dec_sub = dec_sub,
// Decides whether to use OSD path or normal subtitle rendering path.
- .render_bitmap_subs = opts->ass_enabled || !sub_has_get_text(dec_sub),
+ .render_bitmap_subs = opts->ass_enabled || !textsub,
.video_offset = get_track_video_offset(mpctx, track),
};
// Secondary subs are rendered with the "text" renderer to transform them
// to toptitles.
- if (order == 1 && sub_has_get_text(dec_sub))
+ if (order == 1 && textsub)
state.render_bitmap_subs = false;
if (!mpctx->current_track[0][STREAM_VIDEO])