libwebpenc_animencoder: zero initialize the WebPAnimEncoderOptions struct
authorJames Almer <jamrial@gmail.com>
Thu, 17 Mar 2016 03:50:08 +0000 (00:50 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 17 Mar 2016 15:57:20 +0000 (12:57 -0300)
This zeroes the WebPAnimEncoderOptions.verbose field, silencing library info messages
printed to stderr.

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 626b6b769ced6d3e55d2661985ab2a1cb89f481e)

libavcodec/libwebpenc_animencoder.c

index d7437a9..35c456a 100644 (file)
@@ -41,7 +41,7 @@ static av_cold int libwebp_anim_encode_init(AVCodecContext *avctx)
     int ret = ff_libwebp_encode_init_common(avctx);
     if (!ret) {
         LibWebPAnimContext *s = avctx->priv_data;
-        WebPAnimEncoderOptions enc_options;
+        WebPAnimEncoderOptions enc_options = { 0 };
         WebPAnimEncoderOptionsInit(&enc_options);
         // TODO(urvang): Expose some options on command-line perhaps.
         s->enc = WebPAnimEncoderNew(avctx->width, avctx->height, &enc_options);