avcodec/libvpxenc.c: Fix linking with codec interface with msvc.

Default libvpx msvc buils used module definition to export symbols.
These symbols are exported as pointers to data which dont link when
referenced directly.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/merge
Matt Oliver 10 years ago committed by Michael Niedermayer
parent 09b4ad1568
commit 87deebe11a
  1. 4
      libavcodec/libvpxenc.c

@ -855,7 +855,7 @@ static const AVCodecDefault defaults[] = {
#if CONFIG_LIBVPX_VP8_ENCODER #if CONFIG_LIBVPX_VP8_ENCODER
static av_cold int vp8_init(AVCodecContext *avctx) static av_cold int vp8_init(AVCodecContext *avctx)
{ {
return vpx_init(avctx, &vpx_codec_vp8_cx_algo); return vpx_init(avctx, vpx_codec_vp8_cx());
} }
static const AVClass class_vp8 = { static const AVClass class_vp8 = {
@ -884,7 +884,7 @@ AVCodec ff_libvpx_vp8_encoder = {
#if CONFIG_LIBVPX_VP9_ENCODER #if CONFIG_LIBVPX_VP9_ENCODER
static av_cold int vp9_init(AVCodecContext *avctx) static av_cold int vp9_init(AVCodecContext *avctx)
{ {
return vpx_init(avctx, &vpx_codec_vp9_cx_algo); return vpx_init(avctx, vpx_codec_vp9_cx());
} }
static const AVClass class_vp9 = { static const AVClass class_vp9 = {

Loading…
Cancel
Save