[MPlayer-dev-eng] [PATCH] Bug with the switch_ratio command

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jul 29 21:10:16 CEST 2013


On Mon, Jul 29, 2013 at 08:28:18PM +0200, Ingo Brückl wrote:
> Hans-Dieter Kosch wrote on Mon, 29 Jul 2013 18:04:45 +0200:
> 
> > Ingo Brückl wrote:
> >> I wrote on Mon, 29 Jul 2013 14:13:16 +0200:
> >>
> >>> --- libmpcodecs/vd.c (revision 36370)
> >>> +++ libmpcodecs/vd.c (working copy)
> >>> @@ -292,6 +292,9 @@
> >>>      }
> >>>      // time to do aspect ratio corrections...
> >>>
> >>> +    if (!sh->original_aspect)
> >>> +        sh->original_aspect = sh->aspect;
> >>
> >> This assignment should rather be:
> >>
> >>  +        sh->original_aspect = sh->stream_aspect != 0.0 ? sh->stream_aspect : sh->aspect;
> >>
> >> although sh->aspect is set to the stream aspect in line 70 of vd_mpegpes.c
> >> anyway? (Which means that sh->stream_aspect is obsolete? Maybe setting
> >> stream_aspect in mplayer.c has some effect I currently don't see.)
> >>
> > Mmm. Grepping for 'stream_aspect' yields only mplayer.c and
> > libmpcodecs/vd.c. In mplayer.c it is set e.g. on initialisation, and in
> > libmpcodecs/vd.c. it is used in function mpcodecs_config_vo() which in turn
> > is used throughout libmpcodecs/*.c. So it doesn't seem to be obsolete
> > regarding the following.
> 
> What I didn't see is: stream_aspect is known prior to aspect (stream_aspect
> - once - at video initialization, aspect at video playback). So, it seems
> less complex that way.

Another point is that they can be different.
Being able to access both and decide based on that can potentially
enable cleverer decisions.
Once they are all munged into one, potentially a lot of code
changes are required to split them again if needed.
Though most of all it's probably a case of "that's just how it ended
up".


More information about the MPlayer-dev-eng mailing list