[FFmpeg-devel] [PATCH] libvpxenc: quiet unused-variable warning

James Zern jzern at google.com
Sat Feb 20 20:26:19 CET 2016


with older versions of libvpx
since:
432be63 lavc/libvpx: Fix support for RGB colorspace.

Signed-off-by: James Zern <jzern at google.com>
---
 libavcodec/libvpxenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 1239103..b1114bc 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -278,7 +278,9 @@ static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
                        struct vpx_codec_enc_cfg *enccfg, vpx_codec_flags_t *flags,
                        vpx_img_fmt_t *img_fmt)
 {
+#if VPX_IMAGE_ABI_VERSION >= 3
     VP8Context *ctx = avctx->priv_data;
+#endif
 #ifdef VPX_IMG_FMT_HIGHBITDEPTH
     enccfg->g_bit_depth = enccfg->g_input_bit_depth = 8;
 #endif
-- 
2.7.0.rc3.207.g0ac5344



More information about the ffmpeg-devel mailing list