[FFmpeg-devel] [PATCH] avfilter/avf_ahistogram: raise minimum acmax to 1
Paul B Mahol
onemda at gmail.com
Fri May 20 20:04:28 CEST 2016
On 5/20/16, Michael Niedermayer <michael at niedermayer.cc> wrote:
> If acmax can be 0 then it could result in a division by 0
> Fixes CID1351345
But there is cast to double.
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavfilter/avf_ahistogram.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c
> index a716a96..ff94ad4 100644
> --- a/libavfilter/avf_ahistogram.c
> +++ b/libavfilter/avf_ahistogram.c
> @@ -165,7 +165,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> *in)
> const int H = s->histogram_h;
> const int w = s->w;
> int c, y, n, p, bin;
> - uint64_t acmax = 0;
> + uint64_t acmax = 1;
>
> if (!s->out || s->out->width != outlink->w ||
> s->out->height != outlink->h) {
> --
> 1.7.9.5
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list