[MPlayer-dev-eng] [PATCH] fix aspect ratio calculations broken by new av_cmp_q

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Oct 19 08:35:56 CEST 2010


On Mon, Oct 18, 2010 at 07:38:20PM -0400, Andrew Wason wrote:
> > I'd say what you are seeing is that the bug that your patch adds
> > (or I guess restores to be pedantic) works in your favour by disabling
> > aspect updates in some cases (too early to be specific).
> > Maybe below patch works.
> 
> 
> No, this patch doesn't work.
> 
> sh_video->aspect is being correctly computed as 1.777 in
> demux_lavf.c:handle_stream()
> 
> In vd_ffmpeg.c:init_vo, the local variable 'aspect' is 1.333.
> av_cmp_q used to return 0 when ctx->last_sample_aspect_ratio was {0,0}
> and so sh->aspect was left as 1.777

In that case the patch is working exactly as intended.
The container claims one aspect, the video stream claims another.
Currently MPlayer is supposed to go with the value in the video stream,
since otherwise resolution/aspect changes won't work right.
If that happens to be a bad value due to a broken encode that is bad luck
I guess.


More information about the MPlayer-dev-eng mailing list