[vlc-devel] [PATCH] fix video playback on contextes with width and height differing from coded_width and coded_height
Rémi Denis-Courmont
remi at remlab.net
Thu Jun 27 21:29:42 CEST 2013
Le jeudi 27 juin 2013 18:46:16, Vittorio Giovara a écrit :
> diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
> index 5338144..d9e5057 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -125,8 +125,14 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t
> *p_dec, {
> decoder_sys_t *p_sys = p_dec->p_sys;
>
> - p_dec->fmt_out.video.i_width = p_context->width;
> - p_dec->fmt_out.video.i_height = p_context->height;
> + if( p_context->coded_width != p_context->width ||
> + p_context->coded_height != p_context->height )
if() should not be required here.
> + {
> + p_dec->fmt_out.video.i_visible_width = p_context->width;
> + p_dec->fmt_out.video.i_visible_height = p_context->height;
> + }
> + p_dec->fmt_out.video.i_width = p_context->coded_width;
> + p_dec->fmt_out.video.i_height = p_context->coded_height;
>
> if( !p_context->width || !p_context->height )
> {
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list