[MPlayer-cvslog] r36391 - in trunk: DOCS/tech/slave.txt command.c libmpcodecs/vd.c libmpdemux/stheader.h
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Aug 2 09:34:39 CEST 2013
ib <subversion at mplayerhq.hu> wrote:
>Author: ib
>Date: Thu Aug 1 23:18:14 2013
>New Revision: 36391
>
>Log:
>Handle special argument -1 to switch_ratio as intended.
>
>Reset to the original aspect ratio that would have been used for
>the very first rescaling rather than to the display size ratio.
>
>This will now handle anamorphic videos correctly as well.
>
>Modified:
> trunk/DOCS/tech/slave.txt
> trunk/command.c
> trunk/libmpcodecs/vd.c
> trunk/libmpdemux/stheader.h
>
>Modified: trunk/DOCS/tech/slave.txt
>==============================================================================
>--- trunk/DOCS/tech/slave.txt Thu Aug 1 19:45:31 2013 (r36390)
>+++ trunk/DOCS/tech/slave.txt Thu Aug 1 23:18:14 2013 (r36391)
>@@ -409,7 +409,8 @@ switch_angle [value] (DVDs only)
>
> switch_ratio [value]
>Change aspect ratio at runtime. [value] is the new aspect ratio
>expressed
>- as a float (e.g. 1.77778 for 16/9).
>+ as a float (e.g. 1.77778 for 16/9), or special value -1 to reset
>to
>+ original aspect ratio.
> There might be problems with some video filters.
>
> switch_title [value] (DVDNAV only)
>
>Modified: trunk/command.c
>==============================================================================
>--- trunk/command.c Thu Aug 1 19:45:31 2013 (r36390)
>+++ trunk/command.c Thu Aug 1 23:18:14 2013 (r36391)
>@@ -2718,7 +2718,7 @@ int run_command(MPContext *mpctx, mp_cmd
> if (!sh_video)
> break;
> if (cmd->nargs == 0 || cmd->args[0].v.f == -1)
>- movie_aspect = (float) sh_video->disp_w /
>sh_video->disp_h;
>+ movie_aspect = sh_video->original_aspect;
> else
> movie_aspect = cmd->args[0].v.f;
> mpcodecs_config_vo(sh_video, sh_video->disp_w, sh_video->disp_h, 0);
>
>Modified: trunk/libmpcodecs/vd.c
>==============================================================================
>--- trunk/libmpcodecs/vd.c Thu Aug 1 19:45:31 2013 (r36390)
>+++ trunk/libmpcodecs/vd.c Thu Aug 1 23:18:14 2013 (r36391)
>@@ -292,6 +292,9 @@ int mpcodecs_config_vo(sh_video_t *sh, i
> }
> // time to do aspect ratio corrections...
>
>+ if (!sh->original_aspect)
>+ sh->original_aspect = sh->stream_aspect != 0.0 ?
>sh->stream_aspect : sh->aspect;
>+
Maybe I miss something, but this doesn't look to me like it will handle files with aspect changes properly?
More information about the MPlayer-cvslog
mailing list