Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-08-27 01:46:54 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-09-03 01:01:32 +0300
commit42f053494ca1188fe1b9000d4bba53375ee1dc20 (patch)
tree8ac18de8f5740fc285c0fc0018f5a32fb8bb1866 /libavcodec/zmbv.c
parentc5e574a0d0f9a849fdc9e6a779f733eddc048596 (diff)
avcodec/zmbv: remove useless zero check on dimensions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/zmbv.c')
-rw-r--r--libavcodec/zmbv.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index f91d2e3931..251a72cf31 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -599,12 +599,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64);
/* Allocate decompression buffer */
- if (c->decomp_size) {
- if (!(c->decomp_buf = av_mallocz(c->decomp_size))) {
- av_log(avctx, AV_LOG_ERROR,
- "Can't allocate decompression buffer.\n");
- return AVERROR(ENOMEM);
- }
+ c->decomp_buf = av_mallocz(c->decomp_size);
+ if (!c->decomp_buf) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Can't allocate decompression buffer.\n");
+ return AVERROR(ENOMEM);
}
c->zstream.zalloc = Z_NULL;