From ffb1d7807ee0c92b18e5a1c7e6ff408c0da60a5c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Feb 2016 23:41:44 +0100 Subject: player: remove some further current_track dependencies Now it's used for initialization only for audio and video. --- player/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 17e8f7d987..4179690416 100644 --- a/player/video.c +++ b/player/video.c @@ -436,8 +436,7 @@ int reinit_video_chain_src(struct MPContext *mpctx, struct lavfi_pad *src) err_out: no_video: uninit_video_chain(mpctx); - if (track) - error_on_track(mpctx, track); + error_on_track(mpctx, track); handle_force_window(mpctx, true); return 0; } @@ -1246,6 +1245,7 @@ void write_video(struct MPContext *mpctx, double endpts) if (!mpctx->vo_chain) return; + struct track *track = mpctx->vo_chain->track; struct vo *vo = mpctx->vo_chain->vo; // Actual playback starts when both audio and video are ready. @@ -1416,7 +1416,7 @@ void write_video(struct MPContext *mpctx, double endpts) error: MP_FATAL(mpctx, "Could not initialize video chain.\n"); uninit_video_chain(mpctx); - error_on_track(mpctx, mpctx->current_track[STREAM_VIDEO][0]); + error_on_track(mpctx, track); handle_force_window(mpctx, true); mpctx->sleeptime = 0; } -- cgit v1.2.3