diff options
author | wm4 <wm4@nowhere> | 2015-01-13 02:44:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-13 02:45:51 +0100 |
commit | b2cc0fb1aef12254c69ab2e671c010b45b55fb0e (patch) | |
tree | 69d668ca6b4836ce4090e2edaedfb2a72448b6d7 /player | |
parent | 794804725d76b489ed28cbcdb33d12d8bafa23c5 (diff) |
player: fix crash wtih --secondary-sid
Fises #1463.
Diffstat (limited to 'player')
-rw-r--r-- | player/sub.c | 5 |
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]) |