diff options
Diffstat (limited to 'player/sub.c')
-rw-r--r-- | player/sub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/sub.c b/player/sub.c index 6635ef98fb..6e707b3d95 100644 --- a/player/sub.c +++ b/player/sub.c @@ -135,8 +135,9 @@ static bool init_subdec(struct MPContext *mpctx, struct track *track) if (!track->d_sub) return false; + struct track *vtrack = mpctx->current_track[0][STREAM_VIDEO]; struct mp_codec_params *v_c = - mpctx->d_video ? mpctx->d_video->header->codec : NULL; + vtrack && vtrack->stream ? vtrack->stream->codec : NULL; double fps = v_c ? v_c->fps : 25; sub_control(track->d_sub, SD_CTRL_SET_VIDEO_DEF_FPS, &fps); |