diff options
author | wm4 <wm4@nowhere> | 2017-07-12 13:11:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-07-12 13:11:14 +0200 |
commit | ca512b53a0569a3b49e25c52ab191d48b73d649e (patch) | |
tree | 8ae0aa46e39700c5c123560437c9561a6d27597c | |
parent | 9a996313e659d0f3d3058bd7c893a09f82096f0e (diff) | |
download | mpv-ca512b53a0569a3b49e25c52ab191d48b73d649e.tar.bz2 mpv-ca512b53a0569a3b49e25c52ab191d48b73d649e.tar.xz |
player: change default section when loading encoding-profiles.conf
It used to use the "encoding" section. Change this to the default
section to remove another small special case. encoding-profiles.conf
didn't use this by default anyway. The previous revert could mitigate
potential impacts of this a little.
-rw-r--r-- | DOCS/encoding.rst | 8 | ||||
-rw-r--r-- | player/configfiles.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/DOCS/encoding.rst b/DOCS/encoding.rst index fa3ffb8c4a..6f9cd1a390 100644 --- a/DOCS/encoding.rst +++ b/DOCS/encoding.rst @@ -95,12 +95,16 @@ As the options for various devices can get complex, profiles can be used. An example profile file for encoding is provided in etc/encoding-profiles.conf in the source tree. This file is installed and loaded -by default (if libavfilter is enabled at compilation). If you want to modify -it, you can replace and it with your own copy by doing:: +by default. If you want to modify it, you can replace and it with your own copy +by doing:: mkdir -p ~/.mpv cp /etc/mpv/encoding-profiles.conf ~/.mpv/encoding-profiles.conf +Keep in mind that the default profile is the playback one. If you want to add +options that apply only in encoding mode, put them into a ``[encoding]`` +section. + Refer to the top of that file for more comments - in a nutshell, the following options are added by it:: diff --git a/player/configfiles.c b/player/configfiles.c index acc8f0d60b..3f0b57cde3 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -71,10 +71,10 @@ void mp_parse_cfgfiles(struct MPContext *mpctx) // So we "divert" normal options into a separate section, and the diverted // section is never used - unless maybe it's explicitly referenced from an // encoding profile. - if (encoding) { + if (encoding) section = "playback-default"; - load_all_cfgfiles(mpctx, SECT_ENCODE, "encoding-profiles.conf"); - } + + load_all_cfgfiles(mpctx, NULL, "encoding-profiles.conf"); load_all_cfgfiles(mpctx, section, "mpv.conf|config"); |