vlc | branch: master | Pierre Ynard via vlc-devel <vlc-de...@videolan.org> | Sun Nov 8 01:15:01 2020 +0100| [f26398c16aadbbdd47e5e5805c7c1acd73911cab] | committer: Francois Cartegnie
adaptive: honor --preferred-resolution --adaptive-maxheight still takes precedence if set. Fixes #21828 Signed-off-by: Francois Cartegnie <fcvlc...@free.fr> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f26398c16aadbbdd47e5e5805c7c1acd73911cab --- modules/demux/adaptive/PlaylistManager.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp index 0e7b62a141..164ba0949e 100644 --- a/modules/demux/adaptive/PlaylistManager.cpp +++ b/modules/demux/adaptive/PlaylistManager.cpp @@ -847,8 +847,19 @@ AbstractAdaptationLogic *PlaylistManager::createLogic(AbstractAdaptationLogic::L if(logic) { - logic->setMaxDeviceResolution( var_InheritInteger(p_demux, "adaptive-maxwidth"), - var_InheritInteger(p_demux, "adaptive-maxheight") ); + int w = var_InheritInteger(p_demux, "adaptive-maxwidth"); + int h = var_InheritInteger(p_demux, "adaptive-maxheight"); + if(h == 0) + { + h = var_InheritInteger(p_demux, "preferred-resolution"); + /* Adapt for slightly different minimum/maximum semantics */ + if(h == -1) + h = 0; + else if(h == 0) + h = 1; + } + + logic->setMaxDeviceResolution(w, h); } return logic; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits