X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpngenc.c;h=d4d8dc8b5ef99fda2ad5acd8086c3ab88167d3fc;hb=24424a6516f8adc4c73a2fe00fa106b0e49abafd;hp=69b44954049a5b3448d921d78a1d2a5c0273d8af;hpb=4339c94364f8ff143d051fcace3e5801625db607;p=ffmpeg diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 69b44954049..d4d8dc8b5ef 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -748,11 +748,11 @@ static int apng_encode_frame(AVCodecContext *avctx, const AVFrame *pict, original_bytestream_end = s->bytestream_end; temp_bytestream = av_malloc(original_bytestream_end - original_bytestream); - temp_bytestream_end = temp_bytestream + (original_bytestream_end - original_bytestream); if (!temp_bytestream) { ret = AVERROR(ENOMEM); goto fail; } + temp_bytestream_end = temp_bytestream + (original_bytestream_end - original_bytestream); for (last_fctl_chunk.dispose_op = 0; last_fctl_chunk.dispose_op < 3; ++last_fctl_chunk.dispose_op) { // 0: APNG_DISPOSE_OP_NONE