[vlc-devel] [PATCH] Support for rotated MP4 Movies (bug #2882)
Rémi Denis-Courmont
remi at remlab.net
Sun Feb 9 11:12:41 CET 2014
Le samedi 8 février 2014, 00:19:18 Matthias Keiser a écrit :
> diff --git a/src/misc/es_format.c b/src/misc/es_format.c
> index 87b6ada..d64f549 100644
> --- a/src/misc/es_format.c
> +++ b/src/misc/es_format.c
> @@ -243,6 +243,27 @@ void video_format_ScaleCropAr( video_format_t *p_dst,
> const video_format_t *p_sr p_dst->i_sar_num, p_dst->i_sar_den, 65536);
> }
>
> +void video_format_ApplyRotation(const video_format_t * restrict in,
> video_format_t * restrict out) { +
> + *out = *in;
> +
> + if(in->orientation == ORIENT_ROTATED_90 || in->orientation ==
> ORIENT_ROTATED_270 ||
> + in->orientation == ORIENT_LEFT_TOP || in->orientation ==
ORIENT_RIGHT_BOTTOM) {
ORIENT_IS_SWAP(in->orientation) ?
> +
> + out->i_visible_width = in->i_visible_height;
> + out->i_visible_height = in->i_visible_width;
> + out->i_height = in->i_width;
> + out->i_width = in->i_height;
> + out->i_sar_num = in->i_sar_den;
> + out->i_sar_den = in->i_sar_num;
> + out->orientation = ORIENT_NORMAL;
> + }
> + else {
> + out->orientation = ORIENT_NORMAL;
> + }
> +}
> +
> +
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list