[MPlayer-dev-eng] [PATCH] Bug with the switch_ratio command
Hans-Dieter Kosch
hdkosch at kabelbw.de
Mon Jul 29 18:04:45 CEST 2013
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.
sh->aspect is not only set in vd_mpegpes.c, but also e.g in
libmpcodecs/vd_libmpeg2.c and libmpcodecs/vd_ffmpeg.c, but not everywhere, and
in some libmpdemux/*.c. So, maybe, redundancy is rather there (or all that has
good reasons; too complex...)?
Hans-Dieter
More information about the MPlayer-dev-eng
mailing list