[FFmpeg-devel] [PATCH] mlpenc: fix lossless failures, add sanity checks

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Jul 9 21:26:19 EEST 2019




> Am 09.07.2019 um 19:23 schrieb Jai Luthra <me at jailuthra.in>:
> 
> Signed-off-by: Jai Luthra <me at jailuthra.in>
> ---
> libavcodec/mlpenc.c | 72 +++++++++++++++++++++++----------------------
> 1 file changed, 37 insertions(+), 35 deletions(-)
> 
> diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
> index deb171645c..09a8336b47 100644
> --- a/libavcodec/mlpenc.c
> +++ b/libavcodec/mlpenc.c
> @@ -1,6 +1,7 @@
> /**
>  * MLP encoder
>  * Copyright (c) 2008 Ramiro Polla
> + * Copyright (c) 2016-2019 Jai Luthra
>  *
>  * This file is part of FFmpeg.
>  *
> @@ -26,6 +27,7 @@
> #include "libavutil/crc.h"
> #include "libavutil/avstring.h"
> #include "libavutil/samplefmt.h"
> +#include "libavutil/avassert.h"
> #include "mlp.h"
> #include "lpc.h"
> 
> @@ -93,8 +95,8 @@ typedef struct BestOffset {
>     int16_t max;
> } BestOffset;
> 
> -#define HUFF_OFFSET_MIN    -16384
> -#define HUFF_OFFSET_MAX     16383
> +#define HUFF_OFFSET_MIN    (-16384)
> +#define HUFF_OFFSET_MAX    ( 16383)

Please split the patch into self-contained changes with appropriate commit messages.

Thank you, Carl Eugen


More information about the ffmpeg-devel mailing list