aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/zmbvenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-15 20:33:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-15 21:00:50 +0200
commitfb33bff990a8327f59d4c7c509bba1f62bbd6c5a (patch)
treec6f3ad232bed67c703999d78b3fcff66daa8c91d /libavcodec/zmbvenc.c
parent3bb22973518cbef28504e4d5b9fd74453cc3339c (diff)
parentf929ab0569ff31ed5a59b0b0adb7ce09df3fca39 (diff)
downloadffmpeg-fb33bff990a8327f59d4c7c509bba1f62bbd6c5a.tar.gz
Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/zmbvenc.c')
-rw-r--r--libavcodec/zmbvenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 28dbe20f06..2d56a13e01 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -296,7 +296,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
memset(&c->zstream, 0, sizeof(z_stream));
c->comp_size = avctx->width * avctx->height + 1024 +
((avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * ((avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * 2 + 4;
- if ((c->work_buf = av_malloc(c->comp_size)) == NULL) {
+ if (!(c->work_buf = av_malloc(c->comp_size))) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate work buffer.\n");
return AVERROR(ENOMEM);
}
@@ -305,12 +305,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
((c->comp_size + 63) >> 6) + 11;
/* Allocate compression buffer */
- if ((c->comp_buf = av_malloc(c->comp_size)) == NULL) {
+ if (!(c->comp_buf = av_malloc(c->comp_size))) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n");
return AVERROR(ENOMEM);
}
c->pstride = FFALIGN(avctx->width, 16);
- if ((c->prev = av_malloc(c->pstride * avctx->height)) == NULL) {
+ if (!(c->prev = av_malloc(c->pstride * avctx->height))) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n");
return AVERROR(ENOMEM);
}