[vlc-commits] vpx decoder: check if library was built with vp8 support

Rafaël Carré git at videolan.org
Tue Jan 14 11:49:44 CET 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Jan 14 11:48:57 2014 +0100| [25d1d8eee4eff5d409145db3ad17da9f40dc2933] | committer: Rafaël Carré

vpx decoder: check if library was built with vp8 support

It might only contain the vp9 decoder

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25d1d8eee4eff5d409145db3ad17da9f40dc2933
---

 configure.ac        |    3 +++
 modules/codec/vpx.c |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 9504126..2d1ba6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2504,6 +2504,9 @@ AS_IF([test "${enable_vpx}" != "no"],[
         VLC_ADD_PLUGIN([vpx])
         VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
         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], [
             VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
         ], [], [${VPX_LIBS}])
diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index ef151f2..ac7d8d7 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -158,10 +158,12 @@ static int Open(vlc_object_t *p_this)
 
     switch (dec->fmt_in.i_codec)
     {
+#ifdef ENABLE_VP8_DECODER
     case VLC_CODEC_VP8:
         iface = &vpx_codec_vp8_dx_algo;
         vp_version = 8;
         break;
+#endif
 #ifdef ENABLE_VP9_DECODER
     case VLC_CODEC_VP9:
         iface = &vpx_codec_vp9_dx_algo;



More information about the vlc-commits mailing list