[MPlayer-dev-eng] [PATCH] media-based aspect ratio

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Aug 30 00:29:38 CEST 2007


Hello,
On Wed, Aug 29, 2007 at 11:44:19PM +0200, Nico Sabbi wrote:
> I added to sh_video a second aspect_ratio field ( .required_aspect_ratio)
> in order not to overwrite the .aspect_ratio member and to still permit
> users to override the A/R value as it's currently possible.

The name makes no sense to me. Unless you have a better idea, how about
just calling it stream_aspect? Is at least similar to movie_aspect.
It's probably not worth dealing with now but this solution isn't very
flexible, e.g. different aspect for different -vid wouldn't work...

> +        case STREAM_CTRL_GET_ASPECT_RATIO:
> +        {
> +            *((double *)arg) = (double) (!d->vts_file->vtsi_mat->vts_video_attr.display_aspect_ratio ? 4.0/3.0 : 16.0/9.0);

That cast and the () both before and after the = are not really
possible. I don't really mind the (), but I do mind useless casts.

> +    if(stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_ASPECT_RATIO, &ar) != STREAM_UNSUPORTED)
> +      mpctx->sh_video->required_aspect = (float) ar;

Useless cast, too.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list