aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-01-13 02:44:08 +0100
committerGravatar wm4 <wm4@nowhere>2015-01-13 02:45:51 +0100
commitb2cc0fb1aef12254c69ab2e671c010b45b55fb0e (patch)
tree69d668ca6b4836ce4090e2edaedfb2a72448b6d7 /player
parent794804725d76b489ed28cbcdb33d12d8bafa23c5 (diff)
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 f2738864f3..16affc4448 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -199,17 +199,18 @@ void update_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])