OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8d124e
)
libwebpenc: use WebPMemoryWriterClear()
author
James Almer
<jamrial@gmail.com>
Tue, 16 Jun 2015 16:27:20 +0000
(17:27 +0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Wed, 17 Jun 2015 13:13:43 +0000
(14:13 +0100)
WebPMemoryWriterClear() must be used instead of free() when
libwebp ABI version is > 0x0203.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/libwebpenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/libwebpenc.c
b/libavcodec/libwebpenc.c
index
b981f48
..
ef311b7
100644
(file)
--- a/
libavcodec/libwebpenc.c
+++ b/
libavcodec/libwebpenc.c
@@
-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);