[vlc-devel] On-the-fly AR change from decoder
Derk-Jan Hartman
hartman at videolan.org
Wed Sep 10 20:45:57 CEST 2008
On 10 sep 2008, at 15:44, Marian Ďurkovič wrote:
> Hi all,
>
> please find below the "proof of concept" patch for on-the-fly AR
> change
> triggered by the decoder. It lacks a lot of stuff - but it's only
> meant
> to demonstrate it can work. Obviously, it avoids crash on AR change.
Do you have a sample which garantueed hits this issue ?
I have some samples, but i'm not 100% sure.
Also can you test with the OpenGL vout ?
DJ
>
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 0ed169b..2c3591f 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -1248,8 +1248,7 @@ static picture_t *vout_new_buffer( decoder_t
> *p_dec )
> if( p_sys->p_vout == NULL ||
> p_dec->fmt_out.video.i_width != p_sys->video.i_width ||
> p_dec->fmt_out.video.i_height != p_sys->video.i_height ||
> - p_dec->fmt_out.video.i_chroma != p_sys->video.i_chroma ||
> - p_dec->fmt_out.video.i_aspect != p_sys->video.i_aspect )
> + p_dec->fmt_out.video.i_chroma != p_sys->video.i_chroma )
> {
> if( !p_dec->fmt_out.video.i_width ||
> !p_dec->fmt_out.video.i_height )
> @@ -1322,6 +1321,15 @@ static picture_t *vout_new_buffer( decoder_t
> *p_dec )
> if( p_sys->video.i_bmask )
> p_sys->p_vout->render.i_bmask = p_sys->video.i_bmask;
> }
> +
> + if (p_dec->fmt_out.video.i_aspect != p_sys->video.i_aspect )
> + {
> + p_sys->video.i_aspect=p_dec->fmt_out.video.i_aspect;
> + p_sys->p_vout->fmt_in.i_sar_num = p_dec-
> >fmt_out.video.i_sar_num;
> + p_sys->p_vout->fmt_in.i_sar_den = p_dec-
> >fmt_out.video.i_sar_den;
> + p_sys->p_vout->fmt_in.i_aspect = p_dec-
> >fmt_out.video.i_aspect;
> + p_sys->p_vout->i_changes |= VOUT_ASPECT_CHANGE;
> + }
>
> /* Get a new picture
> */
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list