mirror of https://git.ffmpeg.org/ffmpeg.git
lavc/libwebpenc: use WebPMemoryWriterClear()
WebPMemoryWriterClear() must be used instead of free() when libwebp ABI version is > 0x0203 Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
7c51f5bd39
commit
7997d78643
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue