diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-07-22 21:48:33 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-07-22 23:49:15 +0200 |
commit | 8bfd2dd303ef226be7ccd0081832afb92b4a41eb (patch) | |
tree | ce7ad861f80b12766e6aa9ef1ade61a157e162c2 /media-libs | |
parent | media-libs/mlt: Fix vorbis encoding with >=ffmpeg-3.4 (diff) | |
download | gentoo-8bfd2dd303ef226be7ccd0081832afb92b4a41eb.tar.gz gentoo-8bfd2dd303ef226be7ccd0081832afb92b4a41eb.tar.bz2 gentoo-8bfd2dd303ef226be7ccd0081832afb92b4a41eb.zip |
media-libs/mlt: Fix libav build errors
Package-Manager: Portage-2.3.43, Repoman-2.3.10
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/mlt/files/mlt-6.6.0-libav-1.patch | 39 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.6.0-libav-2.patch | 31 | ||||
-rw-r--r-- | media-libs/mlt/files/mlt-6.6.0-libav-3.patch | 23 | ||||
-rw-r--r-- | media-libs/mlt/mlt-6.6.0-r1.ebuild | 5 |
4 files changed, 97 insertions, 1 deletions
diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-1.patch b/media-libs/mlt/files/mlt-6.6.0-libav-1.patch new file mode 100644 index 000000000000..6dc5a73c7fe2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-1.patch @@ -0,0 +1,39 @@ +From bd59735b4f97ae9dff864debdecc2318b0cb8f94 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Mon, 12 Feb 2018 12:21:19 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/producer_avformat.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c +index 214c8b325..7de997cc2 100644 +--- a/src/modules/avformat/producer_avformat.c ++++ b/src/modules/avformat/producer_avformat.c +@@ -1,6 +1,6 @@ + /* + * producer_avformat.c -- avformat producer +- * Copyright (C) 2003-2017 Meltytech, LLC ++ * Copyright (C) 2003-2018 Meltytech, LLC + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -1266,7 +1266,7 @@ static int pick_av_pixel_format( int *pix_fmt ) + return 0; + } + +-#if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) + struct sliced_pix_fmt_conv_t + { + int width, height, slice_w; +@@ -1461,7 +1461,7 @@ static int convert_image( producer_avformat self, AVFrame *frame, uint8_t *buffe + sws_freeContext( context ); + } + else +-#if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) + { + int i, c; + struct sliced_pix_fmt_conv_t ctx = diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-2.patch b/media-libs/mlt/files/mlt-6.6.0-libav-2.patch new file mode 100644 index 000000000000..d29cabec704a --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-2.patch @@ -0,0 +1,31 @@ +From 56e3affe1ff425d979ea9f2a5e086d769852c3fc Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Fri, 16 Feb 2018 09:55:29 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/producer_avformat.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c +index 7de997cc2..2fafd00e8 100644 +--- a/src/modules/avformat/producer_avformat.c ++++ b/src/modules/avformat/producer_avformat.c +@@ -1266,7 +1266,7 @@ static int pick_av_pixel_format( int *pix_fmt ) + return 0; + } + +-#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && (LIBSWSCALE_VERSION_INT >= ((3<<16)+(1<<8)+101)) + struct sliced_pix_fmt_conv_t + { + int width, height, slice_w; +@@ -1461,7 +1461,7 @@ static int convert_image( producer_avformat self, AVFrame *frame, uint8_t *buffe + sws_freeContext( context ); + } + else +-#if defined(FFUDIV) && LIBSWSCALE_VERSION_INT >= AV_VERSION_INT( 3, 1, 101 ) ++#if defined(FFUDIV) && (LIBSWSCALE_VERSION_INT >= ((3<<16)+(1<<8)+101)) + { + int i, c; + struct sliced_pix_fmt_conv_t ctx = diff --git a/media-libs/mlt/files/mlt-6.6.0-libav-3.patch b/media-libs/mlt/files/mlt-6.6.0-libav-3.patch new file mode 100644 index 000000000000..fdbd5ef271f2 --- /dev/null +++ b/media-libs/mlt/files/mlt-6.6.0-libav-3.patch @@ -0,0 +1,23 @@ +From 53181a4e4629e2cd22c6f5d16a459aa843f4bd65 Mon Sep 17 00:00:00 2001 +From: Dan Dennedy <dan@dennedy.org> +Date: Fri, 23 Feb 2018 10:04:47 -0800 +Subject: [PATCH] Fix compile error with libav. + +--- + src/modules/avformat/consumer_avformat.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c +index 6deb76df5..ba5c900c7 100644 +--- a/src/modules/avformat/consumer_avformat.c ++++ b/src/modules/avformat/consumer_avformat.c +@@ -1647,7 +1647,9 @@ static void *consumer_thread( void *arg ) + enc_ctx->audio_avframe->format = c->sample_fmt; + enc_ctx->audio_avframe->nb_samples = enc_ctx->audio_input_frame_size; + enc_ctx->audio_avframe->channel_layout = c->channel_layout; ++#if LIBAVCODEC_VERSION_INT >= ((57<<16)+(96<<8)) && LIBAVCODEC_VERSION_MICRO >= 100 + enc_ctx->audio_avframe->channels = c->channels; ++#endif + } else { + mlt_log_error( MLT_CONSUMER_SERVICE(consumer), "failed to allocate audio AVFrame\n" ); + mlt_events_fire( properties, "consumer-fatal-error", NULL ); diff --git a/media-libs/mlt/mlt-6.6.0-r1.ebuild b/media-libs/mlt/mlt-6.6.0-r1.ebuild index 6fcd43e04231..3e57dbb3e1e8 100644 --- a/media-libs/mlt/mlt-6.6.0-r1.ebuild +++ b/media-libs/mlt/mlt-6.6.0-r1.ebuild @@ -95,7 +95,10 @@ RDEPEND="${COMMON_DEPEND} DOCS=( AUTHORS ChangeLog NEWS README docs/{framework,melt,mlt{++,-xml}}.txt ) -PATCHES=( "${FILESDIR}"/${P}-vorbis-ffmpeg-3.4.patch ) +PATCHES=( + "${FILESDIR}"/${P}-vorbis-ffmpeg-3.4.patch + "${FILESDIR}"/${P}-libav-{1,2,3}.patch +) pkg_setup() { use python && python-single-r1_pkg_setup |