Commit 25d1d8ee authored by Rafaël Carré's avatar Rafaël Carré

vpx decoder: check if library was built with vp8 support

It might only contain the vp9 decoder
parent a177dd4f
...@@ -2504,6 +2504,9 @@ AS_IF([test "${enable_vpx}" != "no"],[ ...@@ -2504,6 +2504,9 @@ AS_IF([test "${enable_vpx}" != "no"],[
VLC_ADD_PLUGIN([vpx]) VLC_ADD_PLUGIN([vpx])
VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}]) VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
VLC_ADD_LIBS([vpx], [${VPX_LIBS}]) VLC_ADD_LIBS([vpx], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER])
], [], [${VPX_LIBS}])
AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [ AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [
VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER]) VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
], [], [${VPX_LIBS}]) ], [], [${VPX_LIBS}])
......
...@@ -158,10 +158,12 @@ static int Open(vlc_object_t *p_this) ...@@ -158,10 +158,12 @@ static int Open(vlc_object_t *p_this)
switch (dec->fmt_in.i_codec) switch (dec->fmt_in.i_codec)
{ {
#ifdef ENABLE_VP8_DECODER
case VLC_CODEC_VP8: case VLC_CODEC_VP8:
iface = &vpx_codec_vp8_dx_algo; iface = &vpx_codec_vp8_dx_algo;
vp_version = 8; vp_version = 8;
break; break;
#endif
#ifdef ENABLE_VP9_DECODER #ifdef ENABLE_VP9_DECODER
case VLC_CODEC_VP9: case VLC_CODEC_VP9:
iface = &vpx_codec_vp9_dx_algo; iface = &vpx_codec_vp9_dx_algo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment