[MPlayer-cvslog] r36413 - in trunk: cfg-common.h command.c help/help_mp-de.h help/help_mp-en.h libmpcodecs/vd.c
ib
subversion at mplayerhq.hu
Wed Aug 7 23:06:59 CEST 2013
Author: ib
Date: Wed Aug 7 23:06:59 2013
New Revision: 36413
Log:
Be more consistent with movie aspect setting and check.
Harmonize option "-aspect" with prescaling check and don't allow
arbitrary values for command switch_ratio / variable movie_aspect.
Modified:
trunk/cfg-common.h
trunk/command.c
trunk/libmpcodecs/vd.c
Changes in other areas also in this revision:
Modified:
trunk/help/help_mp-de.h
trunk/help/help_mp-en.h
Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h Wed Aug 7 22:41:34 2013 (r36412)
+++ trunk/cfg-common.h Wed Aug 7 23:06:59 2013 (r36413)
@@ -535,7 +535,7 @@ const m_option_t common_opts[] = {
{"ssf", scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
{"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0, NULL},
- {"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 10.0, NULL},
+ {"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.01, 10.0, NULL},
{"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, NULL},
{"xy", &screen_size_xy, CONF_TYPE_FLOAT, CONF_RANGE, 0.001, 4096, NULL},
Modified: trunk/command.c
==============================================================================
--- trunk/command.c Wed Aug 7 22:41:34 2013 (r36412)
+++ trunk/command.c Wed Aug 7 23:06:59 2013 (r36413)
@@ -2719,8 +2719,11 @@ int run_command(MPContext *mpctx, mp_cmd
break;
if (cmd->nargs == 0)
movie_aspect = -1.0;
- else
+ else if (cmd->args[0].v.f == -1 || cmd->args[0].v.f >= 0)
movie_aspect = cmd->args[0].v.f;
+ else
+ mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_InvalidSwitchRatio,
+ cmd->args[0].v.f);
mpcodecs_config_vo(sh_video, sh_video->disp_w, sh_video->disp_h, 0);
break;
Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c Wed Aug 7 22:41:34 2013 (r36412)
+++ trunk/libmpcodecs/vd.c Wed Aug 7 23:06:59 2013 (r36413)
@@ -327,7 +327,7 @@ int mpcodecs_config_vo(sh_video_t *sh, i
screen_size_y = screen_size_xy * sh->disp_h / sh->disp_w;
}
}
- if (sh->aspect > 0.01) {
+ if (sh->aspect >= 0.01) {
int w;
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_MovieAspectIsSet,
sh->aspect);
More information about the MPlayer-cvslog
mailing list