Skip to content
Snippets Groups Projects
Commit 1e79d5c6 authored by James Almer's avatar James Almer Committed by Vittorio Giovara
Browse files

libwebpenc: use WebPMemoryWriterClear()


WebPMemoryWriterClear() must be used instead of free() when
libwebp ABI version is > 0x0203.

Signed-off-by: default avatarJames Almer <jamrial@gmail.com>
Signed-off-by: default avatarVittorio Giovara <vittorio.giovara@gmail.com>
parent d8d124ee
No related branches found
No related tags found
No related merge requests found
......@@ -231,7 +231,11 @@ static int libwebp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
*got_packet = 1;
end:
#if (WEBP_ENCODER_ABI_VERSION > 0x0203)
WebPMemoryWriterClear(&mw);
#else
free(mw.mem); /* must use free() according to libwebp documentation */
#endif
WebPPictureFree(pic);
av_freep(&pic);
av_frame_free(&alt_frame);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment