diff options
author | wm4 <wm4@nowhere> | 2018-04-29 20:03:24 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-05-03 01:08:44 +0300 |
commit | e02c9b9902f5bd356088cfbff3b9c333e50f1e47 (patch) | |
tree | 511c7b99c4288cab58d313f29caba78e4f8fdce1 /player/loadfile.c | |
parent | 0ab3184526e7b9b95c06a3ec7a6674283a5922d0 (diff) | |
download | mpv-e02c9b9902f5bd356088cfbff3b9c333e50f1e47.tar.bz2 mpv-e02c9b9902f5bd356088cfbff3b9c333e50f1e47.tar.xz |
build: make encoding mode non-optional
Makes it easier to not break the build by confusing the ifdeffery.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r-- | player/loadfile.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index cf3c1eb013..65d693e264 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1300,16 +1300,14 @@ reopen_file: update_demuxer_properties(mpctx); -#if HAVE_ENCODING - if (mpctx->encode_lavc_ctx && mpctx->current_track[0][STREAM_VIDEO]) - encode_lavc_expect_stream(mpctx->encode_lavc_ctx, STREAM_VIDEO); - if (mpctx->encode_lavc_ctx && mpctx->current_track[0][STREAM_AUDIO]) - encode_lavc_expect_stream(mpctx->encode_lavc_ctx, STREAM_AUDIO); if (mpctx->encode_lavc_ctx) { + if (mpctx->current_track[0][STREAM_VIDEO]) + encode_lavc_expect_stream(mpctx->encode_lavc_ctx, STREAM_VIDEO); + if (mpctx->current_track[0][STREAM_AUDIO]) + encode_lavc_expect_stream(mpctx->encode_lavc_ctx, STREAM_AUDIO); encode_lavc_set_metadata(mpctx->encode_lavc_ctx, mpctx->demuxer->metadata); } -#endif update_playback_speed(mpctx); @@ -1557,7 +1555,6 @@ void mp_play_files(struct MPContext *mpctx) cancel_open(mpctx); -#if HAVE_ENCODING if (mpctx->encode_lavc_ctx) { // Make sure all streams get finished. uninit_audio_out(mpctx); @@ -1568,8 +1565,6 @@ void mp_play_files(struct MPContext *mpctx) mpctx->encode_lavc_ctx = NULL; } -#endif - } // Abort current playback and set the given entry to play next. |