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

James Almer jamrial at gmail.com
Sat Feb 20 20:39:26 CET 2016


On 2/20/2016 4:26 PM, James Zern wrote:
> 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

Can't you just use the av_unused attribute?

>  #ifdef VPX_IMG_FMT_HIGHBITDEPTH
>      enccfg->g_bit_depth = enccfg->g_input_bit_depth = 8;
>  #endif
> 

Either way LGTM.


More information about the ffmpeg-devel mailing list