diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 361baeb3ac..d1e7e6dd31 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -247,7 +247,7 @@ static av_cold int init_cook_mlt(COOKContext *q) int j, ret; int mlt_size = q->samples_per_channel; - if ((q->mlt_window = av_malloc_array(mlt_size, sizeof(*q->mlt_window))) == 0) + if (!(q->mlt_window = av_malloc_array(mlt_size, sizeof(*q->mlt_window)))) return AVERROR(ENOMEM); /* Initialize the MLT window: simple sine window. */