mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue