[FFmpeg-devel] [PATCH] vp9: uses ff_set_dimensions (which sets coded_width/height).

wm4 nfxjfg at googlemail.com
Sat Oct 24 14:44:28 CEST 2015


On Fri, 23 Oct 2015 21:40:14 -0400
"Ronald S. Bultje" <rsbultje at gmail.com> wrote:

> Fixes ticket 4935.
> ---
>  libavcodec/vp9.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index 3753e89..cee17d9 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
> @@ -222,8 +222,7 @@ static int update_size(AVCodecContext *ctx, int w, int h, enum AVPixelFormat fmt
>      if (s->intra_pred_data[0] && w == ctx->width && h == ctx->height && ctx->pix_fmt == fmt)
>          return 0;
>  
> -    ctx->width   = w;
> -    ctx->height  = h;
> +    ff_set_dimensions(ctx, w, h);
>      ctx->pix_fmt = fmt;
>      s->sb_cols   = (w + 63) >> 6;
>      s->sb_rows   = (h + 63) >> 6;

ff_set_dimensions() can fail.


More information about the ffmpeg-devel mailing list