On Wed, Jan 30, 2013 at 04:46:53PM +0100, Anton Khirnov wrote:
> From: Kostya Shishkov <[email protected]>
> 
> Duplicate the last one or two chroma lines.
> 
> Signed-off-by: Anton Khirnov <[email protected]>
> ---
>  libavcodec/xxan.c       |   15 +++++++++++++++
>  tests/ref/fate/xxan-wc4 |   42 +++++++++++++++++++++---------------------
>  2 files changed, 36 insertions(+), 21 deletions(-)
> 
> diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c
> index c28ba2f..1fb5a05 100644
> --- a/libavcodec/xxan.c
> +++ b/libavcodec/xxan.c
> @@ -45,6 +45,11 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
>  
>      avctx->pix_fmt = AV_PIX_FMT_YUV420P;
>  
> +    if (avctx->height < 3) {

make it 8 to be sure (also all movies are probably 320x167 so it should not
hurt anything)

> +        av_log(avctx, AV_LOG_ERROR, "Invalid frame height: %d.\n", 
> avctx->height);
> +        return AVERROR(EINVAL);
> +    }
> +
>      s->buffer_size = avctx->width * avctx->height;
>      s->y_buffer = av_malloc(s->buffer_size);
>      if (!s->y_buffer)

otherwise LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to