diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-07-16 13:28:28 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-11-03 21:59:54 +0100 |
commit | 37388ebb0ef9085c841d7f94e665a5a77cfe0e92 (patch) | |
tree | b47d18bee4e7f661d9e6d794dac0ec1cebcd3a37 /mpvcore/player | |
parent | 891a2a1f474add323145e6b2cd2d29181830e4a4 (diff) | |
download | mpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.bz2 mpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.xz |
configure: uniform the defines to #define HAVE_xxx (0|1)
The configure followed 5 different convetions of defines because the next guy
always wanted to introduce a new better way to uniform it[1]. For an
hypothetic feature 'hurr' you could have had:
* #define HAVE_HURR 1 / #undef HAVE_DURR
* #define HAVE_HURR / #undef HAVE_DURR
* #define CONFIG_HURR 1 / #undef CONFIG_DURR
* #define HAVE_HURR 1 / #define HAVE_DURR 0
* #define CONFIG_HURR 1 / #define CONFIG_DURR 0
All is now uniform and uses:
* #define HAVE_HURR 1
* #define HAVE_DURR 0
We like definining to 0 as opposed to `undef` bcause it can help spot typos
and is very helpful when doing big reorganizations in the code.
[1]: http://xkcd.com/927/ related
Diffstat (limited to 'mpvcore/player')
-rw-r--r-- | mpvcore/player/command.c | 58 | ||||
-rw-r--r-- | mpvcore/player/configfiles.c | 4 | ||||
-rw-r--r-- | mpvcore/player/loadfile.c | 24 | ||||
-rw-r--r-- | mpvcore/player/main.c | 30 | ||||
-rw-r--r-- | mpvcore/player/mp_lua.c | 6 | ||||
-rw-r--r-- | mpvcore/player/osd.c | 2 | ||||
-rw-r--r-- | mpvcore/player/playloop.c | 4 | ||||
-rw-r--r-- | mpvcore/player/sub.c | 2 | ||||
-rw-r--r-- | mpvcore/player/video.c | 2 |
9 files changed, 66 insertions, 66 deletions
diff --git a/mpvcore/player/command.c b/mpvcore/player/command.c index bacc37aa27..05369470ff 100644 --- a/mpvcore/player/command.c +++ b/mpvcore/player/command.c @@ -56,11 +56,11 @@ #include "stream/tv.h" #include "stream/stream_radio.h" #include "stream/pvr.h" -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN #include "stream/dvbin.h" #endif #include "screenshot.h" -#ifdef HAVE_SYS_MMAN_H +#if HAVE_SYS_MMAN_H #include <sys/mman.h> #endif @@ -1137,11 +1137,11 @@ static int mp_property_fullscreen(m_option_t *prop, #define VF_DEINTERLACE_LABEL "deinterlace" static const char *deint_filters[] = { -#ifdef CONFIG_VF_LAVFI +#if HAVE_VF_LAVFI "lavfi=yadif", #endif "yadif", -#if CONFIG_VAAPI_VPP +#if HAVE_VAAPI_VPP "vavpp", #endif NULL @@ -1608,7 +1608,7 @@ static int mp_property_sub_pos(m_option_t *prop, int action, void *arg, return property_osd_helper(prop, action, arg, mpctx); } -#ifdef CONFIG_TV +#if HAVE_TV static tvi_handle_t *get_tvh(struct MPContext *mpctx) { @@ -1955,7 +1955,7 @@ static const m_option_t mp_properties[] = { M_OPTION_PROPERTY_CUSTOM("sub-visibility", property_osd_helper), M_OPTION_PROPERTY_CUSTOM("sub-forced-only", property_osd_helper), M_OPTION_PROPERTY_CUSTOM("sub-scale", property_osd_helper), -#ifdef CONFIG_ASS +#if HAVE_LIBASS M_OPTION_PROPERTY_CUSTOM("ass-use-margins", property_osd_helper), M_OPTION_PROPERTY_CUSTOM("ass-vsfilter-aspect-compat", property_osd_helper), M_OPTION_PROPERTY_CUSTOM("ass-style-override", property_osd_helper), @@ -1964,7 +1964,7 @@ static const m_option_t mp_properties[] = { M_OPTION_PROPERTY_CUSTOM("vf*", mp_property_vf), M_OPTION_PROPERTY_CUSTOM("af*", mp_property_af), -#ifdef CONFIG_TV +#if HAVE_TV { "tv-brightness", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = TV_COLOR_BRIGHTNESS }, { "tv-contrast", mp_property_tv_color, CONF_TYPE_INT, @@ -2071,7 +2071,7 @@ static struct property_osd_display { { "ass-style-override", _("ASS subtitle style override")}, { "vf*", _("Video filters"), .msg = "Video filters:\n${vf}"}, { "af*", _("Audio filters"), .msg = "Audio filters:\n${af}"}, -#ifdef CONFIG_TV +#if HAVE_TV { "tv-brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS }, { "tv-hue", _("Hue"), .osd_progbar = OSD_HUE}, { "tv-saturation", _("Saturation"), .osd_progbar = OSD_SATURATION }, @@ -2272,7 +2272,7 @@ static int edit_filters_osd(struct MPContext *mpctx, enum stream_type mediatype, return r; } -#ifdef HAVE_SYS_MMAN_H +#if HAVE_SYS_MMAN_H static int ext2_sub_find(struct MPContext *mpctx, int id) { @@ -2723,7 +2723,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) (bar_osd ? OSD_SEEK_INFO_BAR : 0); break; -#ifdef CONFIG_RADIO +#if HAVE_RADIO case MP_CMD_RADIO_STEP_CHANNEL: if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO) { int v = cmd->args[0].v.i; @@ -2761,7 +2761,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) break; #endif -#ifdef CONFIG_TV +#if HAVE_TV case MP_CMD_TV_START_SCAN: if (get_tvh(mpctx)) tv_start_scan(get_tvh(mpctx), 1); @@ -2769,27 +2769,27 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_TV_SET_FREQ: if (get_tvh(mpctx)) tv_set_freq(get_tvh(mpctx), cmd->args[0].v.f * 16.0); -#ifdef CONFIG_PVR +#if HAVE_PVR else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) { pvr_set_freq(mpctx->stream, ROUND(cmd->args[0].v.f)); set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "%s: %s", pvr_get_current_channelname(mpctx->stream), pvr_get_current_stationname(mpctx->stream)); } -#endif /* CONFIG_PVR */ +#endif /* HAVE_PVR */ break; case MP_CMD_TV_STEP_FREQ: if (get_tvh(mpctx)) tv_step_freq(get_tvh(mpctx), cmd->args[0].v.f * 16.0); -#ifdef CONFIG_PVR +#if HAVE_PVR else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) { pvr_force_freq_step(mpctx->stream, ROUND(cmd->args[0].v.f)); set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "%s: f %d", pvr_get_current_channelname(mpctx->stream), pvr_get_current_frequency(mpctx->stream)); } -#endif /* CONFIG_PVR */ +#endif /* HAVE_PVR */ break; case MP_CMD_TV_SET_NORM: @@ -2810,7 +2810,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) "Channel: %s", tv_channel_current->name); } } -#ifdef CONFIG_PVR +#if HAVE_PVR else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) { pvr_set_channel_step(mpctx->stream, cmd->args[0].v.i); @@ -2818,8 +2818,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) pvr_get_current_channelname(mpctx->stream), pvr_get_current_stationname(mpctx->stream)); } -#endif /* CONFIG_PVR */ -#ifdef CONFIG_DVBIN +#endif /* HAVE_PVR */ +#if HAVE_DVBIN if (mpctx->stream->type == STREAMTYPE_DVB) { int dir; int v = cmd->args[0].v.i; @@ -2836,7 +2836,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) mpctx->dvbin_reopen = 1; } } -#endif /* CONFIG_DVBIN */ +#endif /* HAVE_DVBIN */ break; case MP_CMD_TV_SET_CHANNEL: @@ -2847,17 +2847,17 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) "Channel: %s", tv_channel_current->name); } } -#ifdef CONFIG_PVR +#if HAVE_PVR else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) { pvr_set_channel(mpctx->stream, cmd->args[0].v.s); set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "%s: %s", pvr_get_current_channelname(mpctx->stream), pvr_get_current_stationname(mpctx->stream)); } -#endif /* CONFIG_PVR */ +#endif /* HAVE_PVR */ break; -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN case MP_CMD_DVB_SET_CHANNEL: if (mpctx->stream->type == STREAMTYPE_DVB) { mpctx->last_dvb_step = 1; @@ -2869,7 +2869,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } } break; -#endif /* CONFIG_DVBIN */ +#endif /* HAVE_DVBIN */ case MP_CMD_TV_LAST_CHANNEL: if (get_tvh(mpctx)) { @@ -2879,14 +2879,14 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) "Channel: %s", tv_channel_current->name); } } -#ifdef CONFIG_PVR +#if HAVE_PVR else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) { pvr_set_lastchannel(mpctx->stream); set_osd_msg(mpctx, OSD_MSG_TV_CHANNEL, osdl, osd_duration, "%s: %s", pvr_get_current_channelname(mpctx->stream), pvr_get_current_stationname(mpctx->stream)); } -#endif /* CONFIG_PVR */ +#endif /* HAVE_PVR */ break; case MP_CMD_TV_STEP_NORM: @@ -2898,7 +2898,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (get_tvh(mpctx)) tv_step_chanlist(get_tvh(mpctx)); break; -#endif /* CONFIG_TV */ +#endif /* HAVE_TV */ case MP_CMD_SUB_ADD: mp_add_subtitles(mpctx, cmd->args[0].v.s); @@ -2978,14 +2978,14 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_SCRIPT_DISPATCH: if (mpctx->lua_ctx) { -#ifdef CONFIG_LUA +#if HAVE_LUA mp_lua_script_dispatch(mpctx, cmd->args[0].v.s, cmd->args[1].v.i, cmd->key_up_follows ? "keyup_follows" : "press"); #endif } break; -#ifdef HAVE_SYS_MMAN_H +#if HAVE_SYS_MMAN_H case MP_CMD_OVERLAY_ADD: overlay_add(mpctx, cmd->args[0].v.i, cmd->args[1].v.i, cmd->args[2].v.i, @@ -3052,7 +3052,7 @@ void mp_notify(struct MPContext *mpctx, enum mp_event event, void *arg) static void handle_script_event(struct MPContext *mpctx, const char *name, const char *arg) { -#ifdef CONFIG_LUA +#if HAVE_LUA mp_lua_event(mpctx, name, arg); #endif } diff --git a/mpvcore/player/configfiles.c b/mpvcore/player/configfiles.c index 1c75231365..29350c0aed 100644 --- a/mpvcore/player/configfiles.c +++ b/mpvcore/player/configfiles.c @@ -202,11 +202,11 @@ char *mp_get_playback_resume_config_filename(const char *fname, goto exit; realpath = mp_path_join(tmp, bstr0(cwd), bstr0(fname)); } -#ifdef CONFIG_DVDREAD +#if HAVE_DVDREAD if (bstr_startswith0(bfname, "dvd://")) realpath = talloc_asprintf(tmp, "%s - %s", realpath, dvd_device); #endif -#ifdef CONFIG_LIBBLURAY +#if HAVE_LIBBLURAY if (bstr_startswith0(bfname, "br://") || bstr_startswith0(bfname, "bd://") || bstr_startswith0(bfname, "bluray://")) realpath = talloc_asprintf(tmp, "%s - %s", realpath, bluray_device); diff --git a/mpvcore/player/loadfile.c b/mpvcore/player/loadfile.c index 876994ac93..24b81934ad 100644 --- a/mpvcore/player/loadfile.c +++ b/mpvcore/player/loadfile.c @@ -56,7 +56,7 @@ #include "mp_core.h" #include "command.h" -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN #include "stream/dvbin.h" #endif @@ -85,7 +85,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask) if (mask & INITIALIZED_LIBASS) { mpctx->initialized_flags &= ~INITIALIZED_LIBASS; -#ifdef CONFIG_ASS +#if HAVE_LIBASS if (mpctx->osd->ass_renderer) ass_renderer_done(mpctx->osd->ass_renderer); mpctx->osd->ass_renderer = NULL; @@ -472,7 +472,7 @@ void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer) static void add_dvd_tracks(struct MPContext *mpctx) { -#ifdef CONFIG_DVDREAD +#if HAVE_DVDREAD struct demuxer *demuxer = mpctx->demuxer; struct stream *stream = demuxer->stream; struct stream_dvd_info_req info; @@ -818,7 +818,7 @@ static bool attachment_is_font(struct demux_attachment *att) static void add_subtitle_fonts_from_sources(struct MPContext *mpctx) { -#ifdef CONFIG_ASS +#if HAVE_LIBASS if (mpctx->opts->ass_enabled) { for (int j = 0; j < mpctx->num_sources; j++) { struct demuxer *d = mpctx->sources[j]; @@ -835,7 +835,7 @@ static void add_subtitle_fonts_from_sources(struct MPContext *mpctx) static void init_sub_renderer(struct MPContext *mpctx) { -#ifdef CONFIG_ASS +#if HAVE_LIBASS assert(!(mpctx->initialized_flags & INITIALIZED_LIBASS)); assert(!mpctx->osd->ass_renderer); @@ -853,7 +853,7 @@ static struct mp_resolve_result *resolve_url(const char *filename, { if (!mp_is_url(bstr0(filename))) return NULL; -#if defined(CONFIG_LIBQUVI) || defined(CONFIG_LIBQUVI9) +#if HAVE_LIBQUVI4 || HAVE_LIBQUVI9 return mp_resolve_quvi(filename, opts); #else return NULL; @@ -979,7 +979,7 @@ static void play_current_file(struct MPContext *mpctx) if (!mpctx->filename) goto terminate_playback; -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING encode_lavc_discontinuity(mpctx->encode_lavc_ctx); #endif @@ -1026,7 +1026,7 @@ static void play_current_file(struct MPContext *mpctx) MP_DBG(mpctx, "\n[[[init getch2]]]\n"); } -#ifdef CONFIG_ASS +#if HAVE_LIBASS if (opts->ass_style_override) ass_set_style_overrides(mpctx->ass_library, opts->ass_force_style_list); #endif @@ -1077,7 +1077,7 @@ static void play_current_file(struct MPContext *mpctx) stream_set_capture_file(mpctx->stream, opts->stream_capture); -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN goto_reopen_demuxer: ; #endif @@ -1164,7 +1164,7 @@ goto_reopen_demuxer: ; preselect_demux_streams(mpctx); -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING if (mpctx->encode_lavc_ctx && mpctx->current_track[STREAM_VIDEO]) encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_VIDEO); if (mpctx->encode_lavc_ctx && mpctx->current_track[STREAM_AUDIO]) @@ -1186,7 +1186,7 @@ goto_reopen_demuxer: ; if (!mpctx->sh_video && !mpctx->sh_audio) { MP_FATAL(mpctx, "No video or audio streams selected.\n"); -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN if (mpctx->stream->type == STREAMTYPE_DVB) { int dir; int v = mpctx->last_dvb_step; @@ -1262,7 +1262,7 @@ goto_reopen_demuxer: ; MP_VERBOSE(mpctx, "EOF code: %d \n", mpctx->stop_play); -#ifdef CONFIG_DVBIN +#if HAVE_DVBIN if (mpctx->dvbin_reopen) { mpctx->stop_play = 0; uninit_player(mpctx, INITIALIZED_ALL - (INITIALIZED_STREAM | INITIALIZED_GETCH2 | (opts->fixed_vo ? INITIALIZED_VO : 0))); diff --git a/mpvcore/player/main.c b/mpvcore/player/main.c index e425b7c051..34383f4264 100644 --- a/mpvcore/player/main.c +++ b/mpvcore/player/main.c @@ -64,11 +64,11 @@ #include "command.h" #include "screenshot.h" -#ifdef CONFIG_X11 +#if HAVE_X11 #include "video/out/x11_common.h" #endif -#ifdef CONFIG_COCOA +#if HAVE_COCOA #include "osdep/macosx_application.h" #endif @@ -109,14 +109,14 @@ static MP_NORETURN void exit_player(struct MPContext *mpctx, int rc; uninit_player(mpctx, INITIALIZED_ALL); -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING encode_lavc_finish(mpctx->encode_lavc_ctx); encode_lavc_free(mpctx->encode_lavc_ctx); #endif mpctx->encode_lavc_ctx = NULL; -#ifdef CONFIG_LUA +#if HAVE_LUA mp_lua_uninit(mpctx); #endif @@ -124,7 +124,7 @@ static MP_NORETURN void exit_player(struct MPContext *mpctx, timeEndPeriod(1); #endif -#ifdef CONFIG_COCOA +#if HAVE_COCOA cocoa_set_input_context(NULL); #endif @@ -134,7 +134,7 @@ static MP_NORETURN void exit_player(struct MPContext *mpctx, osd_free(mpctx->osd); -#ifdef CONFIG_ASS +#if HAVE_LIBASS ass_library_done(mpctx->ass_library); mpctx->ass_library = NULL; #endif @@ -179,7 +179,7 @@ static MP_NORETURN void exit_player(struct MPContext *mpctx, mp_msg_uninit(mpctx->global); talloc_free(mpctx); -#ifdef CONFIG_COCOA +#if HAVE_COCOA terminate_cocoa_application(); // never reach here: // terminate calls exit itself, just silence compiler warning @@ -205,7 +205,7 @@ static bool handle_help_options(struct MPContext *mpctx) talloc_free(list); opt_exit = 1; } -#ifdef CONFIG_X11 +#if HAVE_X11 if (opts->vo.fstype_list && strcmp(opts->vo.fstype_list[0], "help") == 0) { fstype_help(); mp_msg(MSGT_FIXME, MSGL_FIXME, "\n"); @@ -223,7 +223,7 @@ static bool handle_help_options(struct MPContext *mpctx) property_print_help(); opt_exit = 1; } -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING if (encode_lavc_showhelp(mpctx->opts)) opt_exit = 1; #endif @@ -284,7 +284,7 @@ static void init_input(struct MPContext *mpctx) // Set the libstream interrupt callback stream_set_interrupt_callback(mp_input_check_interrupt, mpctx->input); -#ifdef CONFIG_COCOA +#if HAVE_COCOA cocoa_set_input_context(mpctx->input); #endif } @@ -366,13 +366,13 @@ static int mpv_main(int argc, char *argv[]) exit_player(mpctx, EXIT_NONE); } -#ifdef CONFIG_PRIORITY +#if HAVE_PRIORITY set_priority(); #endif init_input(mpctx); -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING if (opts->encode_output.file && *opts->encode_output.file) { mpctx->encode_lavc_ctx = encode_lavc_init(&opts->encode_output); if(!mpctx->encode_lavc_ctx) { @@ -388,7 +388,7 @@ static int mpv_main(int argc, char *argv[]) } #endif -#ifdef CONFIG_ASS +#if HAVE_LIBASS mpctx->ass_library = mp_ass_init(opts); #else MP_WARN(mpctx, "Compiled without libass.\n"); @@ -410,7 +410,7 @@ static int mpv_main(int argc, char *argv[]) mpctx->initialized_flags |= INITIALIZED_VO; } -#ifdef CONFIG_LUA +#if HAVE_LUA // Lua user scripts can call arbitrary functions. Load them at a point // where this is safe. mp_lua_init(mpctx); @@ -432,7 +432,7 @@ static int mpv_main(int argc, char *argv[]) int main(int argc, char *argv[]) { -#ifdef CONFIG_COCOA +#if HAVE_COCOA return cocoa_main(mpv_main, argc, argv); #else return mpv_main(argc, argv); diff --git a/mpvcore/player/mp_lua.c b/mpvcore/player/mp_lua.c index 9339329f17..4b5512c926 100644 --- a/mpvcore/player/mp_lua.c +++ b/mpvcore/player/mp_lua.c @@ -24,13 +24,13 @@ // All these are generated from mpvcore/lua/*.lua static const char *builtin_lua_scripts[][2] = { {"mp.defaults", -# include "lua/defaults.inc" +# include "mpvcore/player/lua/defaults.inc" }, {"mp.assdraw", -# include "lua/assdraw.inc" +# include "mpvcore/player/lua/assdraw.inc" }, {"@osc", -# include "lua/osc.inc" +# include "mpvcore/player/lua/osc.inc" }, {0} }; diff --git a/mpvcore/player/osd.c b/mpvcore/player/osd.c index c7964c03f9..a6cfbcb5bc 100644 --- a/mpvcore/player/osd.c +++ b/mpvcore/player/osd.c @@ -140,7 +140,7 @@ void print_status(struct MPContext *mpctx) saddf(&line, " ct:%7.3f", mpctx->total_avsync_change); } -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING double position = get_current_pos_ratio(mpctx, true); char lavcbuf[80]; if (encode_lavc_getstatus(mpctx->encode_lavc_ctx, lavcbuf, sizeof(lavcbuf), diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c index 8efb6d6693..1162572946 100644 --- a/mpvcore/player/playloop.c +++ b/mpvcore/player/playloop.c @@ -200,7 +200,7 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao, bool reset_ac) mpctx->dropped_frames = 0; mpctx->playback_pts = MP_NOPTS_VALUE; -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING encode_lavc_discontinuity(mpctx->encode_lavc_ctx); #endif } @@ -942,7 +942,7 @@ void run_playloop(struct MPContext *mpctx) bool was_restart = mpctx->restart_playback; bool new_frame_shown = false; -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING if (encode_lavc_didfail(mpctx->encode_lavc_ctx)) { mpctx->stop_play = PT_QUIT; return; diff --git a/mpvcore/player/sub.c b/mpvcore/player/sub.c index d85abcc2c4..94368435d1 100644 --- a/mpvcore/player/sub.c +++ b/mpvcore/player/sub.c @@ -129,7 +129,7 @@ void update_subtitles(struct MPContext *mpctx) static void set_dvdsub_fake_extradata(struct dec_sub *dec_sub, struct stream *st, int width, int height) { -#ifdef CONFIG_DVDREAD +#if HAVE_DVDREAD if (!st) return; diff --git a/mpvcore/player/video.c b/mpvcore/player/video.c index a6e9f8aecb..8f57bd97ad 100644 --- a/mpvcore/player/video.c +++ b/mpvcore/player/video.c @@ -44,7 +44,7 @@ void update_fps(struct MPContext *mpctx) { -#ifdef CONFIG_ENCODING +#if HAVE_ENCODING struct sh_video *sh_video = mpctx->sh_video; if (mpctx->encode_lavc_ctx && sh_video) encode_lavc_set_video_fps(mpctx->encode_lavc_ctx, sh_video->fps); |