summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/vlc/Makefile27
-rw-r--r--package/vlc/patches/patch-Makefile_am11
-rw-r--r--package/vlc/patches/patch-bin_Makefile_am11
-rw-r--r--package/vlc/patches/patch-configure_ac122
-rw-r--r--package/vlc/patches/patch-include_vlc_fixups_h15
-rw-r--r--package/vlc/patches/patch-modules_codec_avcodec_audio_c11
-rw-r--r--package/vlc/patches/patch-modules_codec_avcodec_encoder_c92
-rw-r--r--package/vlc/patches/patch-modules_codec_avcodec_vaapi_c11
-rw-r--r--package/vlc/patches/patch-modules_codec_avcodec_video_c51
-rw-r--r--package/vlc/patches/patch-modules_demux_avformat_demux_c46
-rw-r--r--package/vlc/patches/patch-src_posix_error_c27
-rw-r--r--package/vlc/patches/patch-src_posix_thread_c11
12 files changed, 15 insertions, 420 deletions
diff --git a/package/vlc/Makefile b/package/vlc/Makefile
index a5395b879..ab1bbcb73 100644
--- a/package/vlc/Makefile
+++ b/package/vlc/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= vlc
-PKG_VERSION:= 2.2.6
+PKG_VERSION:= 3.0.18
PKG_RELEASE:= 1
-PKG_HASH:= c403d3accd9a400eb2181c958f3e7bc5524fe5738425f4253d42883b425a42a8
+PKG_HASH:= 57094439c365d8aa8b9b41fa3080cc0eef2befe6025bb5cef722accc625aedec
PKG_DESCR:= popular media player
PKG_SECTION:= mm/video
PKG_DEPENDS:= libffmpeg xcb-util libgcrypt alsa-lib
@@ -16,16 +16,13 @@ PKG_URL:= http://www.videolan.org/vlc/
PKG_SITES:= http://download.videolan.org/pub/videolan/vlc/$(PKG_VERSION)/
PKG_FLAVOURS_VLC:= WITH_BLURAY WITH_MAD WITH_OGG WITH_OPUS WITH_SPEEX WITH_THEORA
-PKG_FLAVOURS_VLC+= WITH_VPX WITH_MATROSKA
+PKG_FLAVOURS_VLC+= WITH_VPX WITH_X264
PKGFD_WITH_BLURAY:= enable bluray support
PKGFB_WITH_BLURAY:= libbluray
PKGFS_WITH_BLURAY:= libbluray
PKGFD_WITH_MAD:= enable mp3 support
PKGFB_WITH_MAD:= libmad
PKGFS_WITH_MAD:= libmad
-PKGFD_WITH_MATROSKA:= enable matroska support
-PKGFB_WITH_MATROSKA:= libmatroska
-PKGFS_WITH_MATROSKA:= libmatroska
PKGFD_WITH_OGG:= enable ogg support
PKGFB_WITH_OGG:= libogg
PKGFS_WITH_OGG:= libogg
@@ -41,6 +38,9 @@ PKGFS_WITH_THEORA:= libtheora
PKGFD_WITH_VPX:= enable vpx support
PKGFB_WITH_VPX:= libvpx
PKGFS_WITH_VPX:= libvpx
+PKGFD_WITH_X264:= enable h264 support
+PKGFB_WITH_X264:= libx264
+PKGFS_WITH_X264:= libx264
include $(ADK_TOPDIR)/mk/package.mk
@@ -66,7 +66,10 @@ CONFIGURE_ARGS+= --disable-lua \
--enable-libgcrypt \
--disable-optimizations \
--disable-static \
- --disable-avcodec
+ --disable-swscale \
+ --disable-avformat \
+ --disable-avcodec \
+ --disable-mpg123
ifeq ($(ADK_TARGET_ARCH_ARM_WITH_NEON),)
CONFIGURE_ARGS+= --disable-neon
@@ -82,11 +85,6 @@ CONFIGURE_ARGS+= --enable-mad
else
CONFIGURE_ARGS+= --disable-mad
endif
-ifneq ($(ADK_PACKAGE_VLC_WITH_MATROSKA),)
-CONFIGURE_ARGS+= --enable-mkv
-else
-CONFIGURE_ARGS+= --disable-mkv
-endif
ifneq ($(ADK_PACKAGE_VLC_WITH_OGG),)
CONFIGURE_ARGS+= --enable-ogg
else
@@ -112,6 +110,11 @@ CONFIGURE_ARGS+= --enable-vpx
else
CONFIGURE_ARGS+= --disable-vpx
endif
+ifneq ($(ADK_PACKAGE_VLC_WITH_X264),)
+CONFIGURE_ARGS+= --enable-x264
+else
+CONFIGURE_ARGS+= --disable-x264
+endif
vlc-install:
$(INSTALL_DIR) $(IDIR_VLC)/usr/bin
diff --git a/package/vlc/patches/patch-Makefile_am b/package/vlc/patches/patch-Makefile_am
deleted file mode 100644
index b41062e43..000000000
--- a/package/vlc/patches/patch-Makefile_am
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.2.4.orig/Makefile.am 2015-10-21 19:48:45.000000000 +0200
-+++ vlc-2.2.4/Makefile.am 2016-09-24 20:37:45.255479549 +0200
-@@ -933,7 +933,7 @@ libvlc: libvlccore
- cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
-
- core: libvlc vlc$(EXEEXT)
-- cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
-+ cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT)
-
- doc:
- cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
diff --git a/package/vlc/patches/patch-bin_Makefile_am b/package/vlc/patches/patch-bin_Makefile_am
deleted file mode 100644
index 5a3ea1bb2..000000000
--- a/package/vlc/patches/patch-bin_Makefile_am
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.2.4.orig/bin/Makefile.am 2015-02-02 20:42:28.000000000 +0100
-+++ vlc-2.2.4/bin/Makefile.am 2016-09-24 20:37:45.251479394 +0200
-@@ -1,7 +1,7 @@
- # Building vlc
- #
- bin_PROGRAMS = vlc
--noinst_PROGRAMS = vlc-static
-+noinst_PROGRAMS =
- noinst_DATA =
- vlclib_PROGRAMS = vlc-cache-gen
- EXTRA_PROGRAMS = vlc-wrapper
diff --git a/package/vlc/patches/patch-configure_ac b/package/vlc/patches/patch-configure_ac
deleted file mode 100644
index ff67e1512..000000000
--- a/package/vlc/patches/patch-configure_ac
+++ /dev/null
@@ -1,122 +0,0 @@
---- vlc-2.2.6.orig/configure.ac 2017-05-24 12:40:16.000000000 +0200
-+++ vlc-2.2.6/configure.ac 2017-06-06 22:52:45.841013479 +0200
-@@ -24,7 +24,7 @@ AC_CANONICAL_BUILD
- AC_CANONICAL_HOST
- AC_PRESERVE_HELP_ORDER
-
--AM_INIT_AUTOMAKE(tar-ustar color-tests foreign)
-+AM_INIT_AUTOMAKE(tar-ustar color-tests foreign subdir-objects)
- AC_CONFIG_HEADERS([config.h])
-
- # Disable with "./configure --disable-silent-rules" or "make V=1"
-@@ -121,6 +121,7 @@ case "${host_os}" in
- ;;
- linux*)
- SYS=linux
-+ AC_CHECK_LIB([rt], [posix_spawnp], [VLC_ADD_LIBS([libvlccore],[-lrt])], [], [])
- ;;
- bsdi*)
- SYS=bsdi
-@@ -537,7 +538,7 @@ need_libc=false
-
- dnl Check for usual libc functions
- AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
--AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
-+AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale strerror_l stricmp strnicmp strptime uselocale])
- AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
- AC_CHECK_FUNCS(fdatasync,,
- [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
-@@ -867,7 +868,7 @@ dnl
- dnl Compiler warnings
- dnl
-
--RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
-+RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var])
- RDC_PROG_CC_FLAGS([-pipe])
- AC_LANG_PUSH([C++])
- RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var])
-@@ -2318,7 +2319,7 @@ AC_ARG_ENABLE(avcodec,
- AS_IF([test "${enable_avcodec}" != "no"], [
- PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
- PKG_CHECK_EXISTS([libavutil < 55],, [
-- AC_MSG_ERROR([libavutil versions 55 and later are not supported.])
-+ AC_MSG_WARN([libavutil versions 55 and later are not supported.])
- ])
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
-@@ -2328,7 +2329,7 @@ AS_IF([test "${enable_avcodec}" != "no"]
- VLC_RESTORE_FLAGS
- have_avcodec="yes"
- ],[
-- AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
-+ AC_MSG_WARN([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
- ])
- ], [
- have_avcodec="no"
-@@ -2377,7 +2378,7 @@ AS_IF([test "${have_vaapi}" = "yes" -a "
- case "${avfork}" in
- ffmpeg)
- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-- AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.])
-+ AC_MSG_WARN([VA API requires FFmpeg libavcodec < 57.10 or libav.])
- ])
- ;;
- esac
-@@ -2411,7 +2412,7 @@ AS_IF([test "${enable_dxva2}" != "no"],
- case "${avfork}" in
- ffmpeg)
- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-- AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
-+ AC_MSG_WARN([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
- ])
- ;;
- esac
-@@ -2503,7 +2504,7 @@ AS_IF([test "${enable_avformat}" != "no"
- ])
- VLC_RESTORE_FLAGS
- ],[
-- AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
-+ AC_MSG_WARN([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
- ])
- ])
- AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
-@@ -2532,7 +2533,7 @@ then
- ])
- VLC_RESTORE_FLAGS
- ],[
-- AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
-+ AC_MSG_WARN([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
- ])
- fi
-
-@@ -3175,7 +3176,7 @@ AS_IF([test "${have_vdpau}" = "yes" -a "
- libav) av_vdpau_ver="55.26.0" ;;
- ffmpeg) av_vdpau_ver="55.42.100"
- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-- AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.])
-+ AC_MSG_WARN([VDPAU requires FFmpeg libavcodec < 57.10 or libav.])
- ])
- ;;
- esac
-@@ -4056,16 +4057,17 @@ dnl
- AC_ARG_ENABLE(libgcrypt,
- [ --disable-libgcrypt gcrypt support (default enabled)])
- AS_IF([test "${enable_libgcrypt}" != "no"], [
-+ AC_PATH_PROG([GCRYPT_CONFIG],[libgcrypt-config],[libgcrypt-config])
- AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
-- libgcrypt-config --version >/dev/null || \
-+ ${GCRYPT_CONFIG} --version >/dev/null || \
- AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
- AC_CHECK_LIB(gcrypt, gcry_control, [
- have_libgcrypt="yes"
-- GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
-- GCRYPT_LIBS="`libgcrypt-config --libs`"
-+ GCRYPT_CFLAGS="`${GCRYPT_CONFIG} --cflags`"
-+ GCRYPT_LIBS="`${GCRYPT_CONFIG} --libs`"
- ], [
- AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or pass --disable-libgcrypt.])
-- ], [`libgcrypt-config --libs`])
-+ ], [`${GCRYPT_CONFIG} --libs`])
- ], [
- AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.])
- ], [#include <gcrypt.h>]
diff --git a/package/vlc/patches/patch-include_vlc_fixups_h b/package/vlc/patches/patch-include_vlc_fixups_h
deleted file mode 100644
index 968f8d8eb..000000000
--- a/package/vlc/patches/patch-include_vlc_fixups_h
+++ /dev/null
@@ -1,15 +0,0 @@
---- vlc-2.2.6.orig/include/vlc_fixups.h 2015-04-13 21:54:35.000000000 +0200
-+++ vlc-2.2.6/include/vlc_fixups.h 2017-06-06 22:56:59.837313883 +0200
-@@ -239,8 +239,10 @@ static inline locale_t newlocale(int mas
- }
- #endif
-
--#if !defined (HAVE_STATIC_ASSERT)
--# define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
-+#if !defined (HAVE_STATIC_ASSERT) && !defined(__cpp_static_assert)
-+# define STATIC_ASSERT_CONCAT_(a, b) a##b
-+# define STATIC_ASSERT_CONCAT(a, b) STATIC_ASSERT_CONCAT_(a, b)
-+# define _Static_assert(x, s) extern char STATIC_ASSERT_CONCAT(static_assert_, __LINE__)[sizeof(struct { unsigned:-!(x); })]
- # define static_assert _Static_assert
- #endif
-
diff --git a/package/vlc/patches/patch-modules_codec_avcodec_audio_c b/package/vlc/patches/patch-modules_codec_avcodec_audio_c
deleted file mode 100644
index 9dfaff716..000000000
--- a/package/vlc/patches/patch-modules_codec_avcodec_audio_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.2.4.orig/modules/codec/avcodec/audio.c 2016-01-18 21:49:57.000000000 +0100
-+++ vlc-2.2.4/modules/codec/avcodec/audio.c 2016-09-24 20:35:02.681191261 +0200
-@@ -39,7 +39,7 @@
- #include <libavcodec/avcodec.h>
- #include <libavutil/mem.h>
-
--#include <libavutil/audioconvert.h>
-+#include <libavutil/channel_layout.h>
-
- #include "avcodec.h"
-
diff --git a/package/vlc/patches/patch-modules_codec_avcodec_encoder_c b/package/vlc/patches/patch-modules_codec_avcodec_encoder_c
deleted file mode 100644
index 3766addf8..000000000
--- a/package/vlc/patches/patch-modules_codec_avcodec_encoder_c
+++ /dev/null
@@ -1,92 +0,0 @@
---- vlc-2.2.4.orig/modules/codec/avcodec/encoder.c 2015-10-21 19:48:45.000000000 +0200
-+++ vlc-2.2.4/modules/codec/avcodec/encoder.c 2016-09-24 20:35:02.681191261 +0200
-@@ -41,7 +41,7 @@
- #include <vlc_cpu.h>
-
- #include <libavcodec/avcodec.h>
--#include <libavutil/audioconvert.h>
-+#include <libavutil/channel_layout.h>
-
- #include "avcodec.h"
- #include "avcommon.h"
-@@ -311,7 +311,7 @@ int OpenEncoder( vlc_object_t *p_this )
- else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
- &psz_namecodec ) )
- {
-- if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )
-+ if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE )
- return VLC_EGENERIC; /* handed chroma output */
-
- i_cat = VIDEO_ES;
-@@ -555,7 +555,7 @@ int OpenEncoder( vlc_object_t *p_this )
-
- if( p_codec->pix_fmts )
- {
-- const enum PixelFormat *p = p_codec->pix_fmts;
-+ const enum AVPixelFormat *p = p_codec->pix_fmts;
- for( ; *p != -1; p++ )
- {
- if( *p == p_context->pix_fmt ) break;
-@@ -1017,7 +1017,7 @@ errmsg:
- }
- }
-
-- p_sys->frame = avcodec_alloc_frame();
-+ p_sys->frame = av_frame_alloc();
- if( !p_sys->frame )
- {
- goto error;
-@@ -1048,7 +1048,7 @@ static void vlc_av_packet_Release(block_
- {
- vlc_av_packet_t *b = (void *) block;
-
-- av_free_packet(&b->packet);
-+ av_packet_unref(&b->packet);
- free(b);
- }
-
-@@ -1088,7 +1088,7 @@ static block_t *EncodeVideo( encoder_t *
- AVFrame *frame = NULL;
- if( likely(p_pict) ) {
- frame = p_sys->frame;
-- avcodec_get_frame_defaults( frame );
-+ av_frame_unref( frame );
- for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
- {
- p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels;
-@@ -1188,7 +1188,7 @@ static block_t *EncodeVideo( encoder_t *
- av_pkt.duration / p_sys->p_context->time_base.den, p_sys->p_context );
- if( unlikely(p_block == NULL) )
- {
-- av_free_packet( &av_pkt );
-+ av_packet_unref( &av_pkt );
- return NULL;
- }
-
-@@ -1329,7 +1329,7 @@ static block_t *handle_delay_buffer( enc
- //How much we need to copy from new packet
- const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
-
-- avcodec_get_frame_defaults( p_sys->frame );
-+ av_frame_unref( p_sys->frame );
- p_sys->frame->format = p_sys->p_context->sample_fmt;
- p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
-
-@@ -1451,7 +1451,7 @@ static block_t *EncodeAudio( encoder_t *
- while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) ||
- ( p_sys->b_variable && p_aout_buf->i_nb_samples ) )
- {
-- avcodec_get_frame_defaults( p_sys->frame );
-+ av_frame_unref( p_sys->frame );
- if( p_sys->b_variable )
- p_sys->frame->nb_samples = p_aout_buf->i_nb_samples;
- else
-@@ -1514,7 +1514,7 @@ void CloseEncoder( vlc_object_t *p_this
- encoder_t *p_enc = (encoder_t *)p_this;
- encoder_sys_t *p_sys = p_enc->p_sys;
-
-- /*FIXME: we should use avcodec_free_frame, but we don't require so new avcodec that has it*/
-+ /*FIXME: we should use av_frame_free, but we don't require so new avcodec that has it*/
- av_freep( &p_sys->frame );
-
- vlc_avcodec_lock();
diff --git a/package/vlc/patches/patch-modules_codec_avcodec_vaapi_c b/package/vlc/patches/patch-modules_codec_avcodec_vaapi_c
deleted file mode 100644
index 1fdad6258..000000000
--- a/package/vlc/patches/patch-modules_codec_avcodec_vaapi_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.2.4.orig/modules/codec/avcodec/vaapi.c 2015-02-02 20:42:29.000000000 +0100
-+++ vlc-2.2.4/modules/codec/avcodec/vaapi.c 2016-09-24 20:35:02.681191261 +0200
-@@ -595,7 +595,7 @@ static int Create( vlc_va_t *p_va, AVCod
- return err;
-
- /* Only VLD supported */
-- p_va->pix_fmt = PIX_FMT_VAAPI_VLD;
-+ p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD;
- p_va->setup = Setup;
- p_va->get = Get;
- p_va->release = Release;
diff --git a/package/vlc/patches/patch-modules_codec_avcodec_video_c b/package/vlc/patches/patch-modules_codec_avcodec_video_c
deleted file mode 100644
index c9d3fb226..000000000
--- a/package/vlc/patches/patch-modules_codec_avcodec_video_c
+++ /dev/null
@@ -1,51 +0,0 @@
---- vlc-2.2.6.orig/modules/codec/avcodec/video.c 2016-09-27 09:56:26.000000000 +0200
-+++ vlc-2.2.6/modules/codec/avcodec/video.c 2017-06-06 22:52:46.745071498 +0200
-@@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC
- static int ffmpeg_GetFrameBuf ( struct AVCodecContext *, AVFrame * );
- static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
- #endif
--static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
-- const enum PixelFormat * );
-+static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *,
-+ const enum AVPixelFormat * );
-
- static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
- {
-@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
- p_sys->p_codec = p_codec;
- p_sys->i_codec_id = i_codec_id;
- p_sys->psz_namecodec = psz_namecodec;
-- p_sys->p_ff_pic = avcodec_alloc_frame();
-+ p_sys->p_ff_pic = av_frame_alloc();
- p_sys->b_delayed_open = true;
- p_sys->p_va = NULL;
- vlc_sem_init( &p_sys->sem_mt, 0 );
-@@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
- if( ffmpeg_OpenCodec( p_dec ) < 0 )
- {
- msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
-- avcodec_free_frame( &p_sys->p_ff_pic );
-+ av_frame_free( &p_sys->p_ff_pic );
- vlc_sem_destroy( &p_sys->sem_mt );
- free( p_sys );
- return VLC_EGENERIC;
-@@ -847,7 +847,7 @@ void EndVideoDec( decoder_t *p_dec )
- wait_mt( p_sys );
-
- if( p_sys->p_ff_pic )
-- avcodec_free_frame( &p_sys->p_ff_pic );
-+ av_frame_free( &p_sys->p_ff_pic );
-
- if( p_sys->p_va )
- vlc_va_Delete( p_sys->p_va );
-@@ -1334,8 +1334,8 @@ static void ffmpeg_ReleaseFrameBuf( stru
- }
- #endif
-
--static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
-- const enum PixelFormat *pi_fmt )
-+static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
-+ const enum AVPixelFormat *pi_fmt )
- {
- decoder_t *p_dec = p_context->opaque;
- decoder_sys_t *p_sys = p_dec->p_sys;
diff --git a/package/vlc/patches/patch-modules_demux_avformat_demux_c b/package/vlc/patches/patch-modules_demux_avformat_demux_c
deleted file mode 100644
index ca710b26b..000000000
--- a/package/vlc/patches/patch-modules_demux_avformat_demux_c
+++ /dev/null
@@ -1,46 +0,0 @@
---- vlc-2.2.4.orig/modules/demux/avformat/demux.c 2016-01-18 21:49:57.000000000 +0100
-+++ vlc-2.2.4/modules/demux/avformat/demux.c 2016-09-24 20:35:02.681191261 +0200
-@@ -734,14 +734,14 @@ static int Demux( demux_t *p_demux )
- }
- if( pkt.stream_index < 0 || pkt.stream_index >= p_sys->i_tk )
- {
-- av_free_packet( &pkt );
-+ av_packet_unref( &pkt );
- return 1;
- }
- const AVStream *p_stream = p_sys->ic->streams[pkt.stream_index];
- if( p_stream->time_base.den <= 0 )
- {
- msg_Warn( p_demux, "Invalid time base for the stream %d", pkt.stream_index );
-- av_free_packet( &pkt );
-+ av_packet_unref( &pkt );
- return 1;
- }
- if( p_stream->codec->codec_id == AV_CODEC_ID_SSA )
-@@ -749,7 +749,7 @@ static int Demux( demux_t *p_demux )
- p_frame = BuildSsaFrame( &pkt, p_sys->i_ssa_order++ );
- if( !p_frame )
- {
-- av_free_packet( &pkt );
-+ av_packet_unref( &pkt );
- return 1;
- }
- }
-@@ -757,7 +757,7 @@ static int Demux( demux_t *p_demux )
- {
- if( ( p_frame = block_Alloc( pkt.size ) ) == NULL )
- {
-- av_free_packet( &pkt );
-+ av_packet_unref( &pkt );
- return 0;
- }
- memcpy( p_frame->p_buffer, pkt.data, pkt.size );
-@@ -838,7 +838,7 @@ static int Demux( demux_t *p_demux )
- else
- block_Release( p_frame );
-
-- av_free_packet( &pkt );
-+ av_packet_unref( &pkt );
- return 1;
- }
-
diff --git a/package/vlc/patches/patch-src_posix_error_c b/package/vlc/patches/patch-src_posix_error_c
deleted file mode 100644
index ef51c996e..000000000
--- a/package/vlc/patches/patch-src_posix_error_c
+++ /dev/null
@@ -1,27 +0,0 @@
---- vlc-2.2.4.orig/src/posix/error.c 2015-02-02 20:42:32.000000000 +0100
-+++ vlc-2.2.4/src/posix/error.c 2016-09-24 20:34:45.824539253 +0200
-@@ -31,6 +31,7 @@
-
- static const char *vlc_strerror_l(int errnum, const char *lname)
- {
-+#ifdef HAVE_STRERROR_L
- int saved_errno = errno;
- locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0);
-
-@@ -48,9 +49,16 @@ static const char *vlc_strerror_l(int er
- errno = saved_errno;
- }
-
-+#if defined(__UCLIBC__)
-+ const char *buf = strerror_r(errnum, loc, 100);
-+#else
- const char *buf = strerror_l(errnum, loc);
-+#endif
-
- freelocale(loc);
-+#else
-+ const char *buf = strerror(errnum);
-+#endif
- return buf;
- }
-
diff --git a/package/vlc/patches/patch-src_posix_thread_c b/package/vlc/patches/patch-src_posix_thread_c
deleted file mode 100644
index 5c636c164..000000000
--- a/package/vlc/patches/patch-src_posix_thread_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- vlc-2.2.4.orig/src/posix/thread.c 2015-02-02 20:42:32.000000000 +0100
-+++ vlc-2.2.4/src/posix/thread.c 2016-09-24 20:34:51.776769484 +0200
-@@ -85,7 +85,7 @@ static clockid_t vlc_clock_id;
-
- static void vlc_clock_setup_once (void)
- {
--# if (_POSIX_MONOTONIC_CLOCK == 0)
-+# if (_POSIX_MONOTONIC_CLOCK == 0) && (_POSIX_CLOCK_SELECTION > 0)
- long val = sysconf (_SC_MONOTONIC_CLOCK);
- assert (val != 0);
- vlc_clock_id = (val < 0) ? CLOCK_REALTIME : CLOCK_MONOTONIC;