From d81576c9a6da02e3019fb55f7ec039eb673b62af Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Jun 2017 15:17:01 +0200 Subject: [PATCH] player: disable --frames in WIP LGPL mode Commit d8fd7131 changes this. "tibcu" did not reply. While I'm not sure whether copyrightable code remains, I'd tend towards saying yes (the basic idea is still intact after years of refactoring), so make it GPL-only for now. --- options/options.c | 3 +++ player/loadfile.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/options/options.c b/options/options.c index 44d9652cc6..a6adb9cd88 100644 --- a/options/options.c +++ b/options/options.c @@ -313,7 +313,10 @@ const m_option_t mp_opts[] = { // ------------------------- demuxer options -------------------- +#if HAVE_GPL + // Possibly GPL due to d8fd7131bbcde029ab41799fd3162050b43f6848. OPT_CHOICE_OR_INT("frames", play_frames, 0, 0, INT_MAX, ({"all", -1})), +#endif OPT_REL_TIME("start", play_start, 0), OPT_REL_TIME("end", play_end, 0), diff --git a/player/loadfile.c b/player/loadfile.c index e0a796d9fc..95b3eb0350 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1117,7 +1117,10 @@ static void play_current_file(struct MPContext *mpctx) load_per_file_options(mpctx->mconfig, mpctx->playing->params, mpctx->playing->num_params); +#if HAVE_GPL + // Possibly GPL due to d8fd7131bbcde029ab41799fd3162050b43f6848. mpctx->max_frames = opts->play_frames; +#endif handle_force_window(mpctx, false); @@ -1247,12 +1250,15 @@ reopen_file: mp_notify(mpctx, MPV_EVENT_FILE_LOADED, NULL); update_screensaver_state(mpctx); +#if HAVE_GPL + // Possibly GPL due to d8fd7131bbcde029ab41799fd3162050b43f6848. if (mpctx->max_frames == 0) { if (!mpctx->stop_play) mpctx->stop_play = PT_NEXT_ENTRY; mpctx->error_playing = 0; goto terminate_playback; } +#endif double startpos = rel_time_to_abs(mpctx, opts->play_start); if (startpos == MP_NOPTS_VALUE && opts->chapterrange[0] > 0) {