summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-09-16 12:31:13 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-09-16 12:31:13 +0200
commit2a941b98a6cca524a92ab046f04b5d2c0a13ed28 (patch)
treef2b17b0e9caa7b159e9e835577fcb5b36a2b4639
parentmedia-video/cinelerra: fix build with ffmpeg git master. (diff)
downloadgentoo-2a941b98a6cca524a92ab046f04b5d2c0a13ed28.tar.gz
gentoo-2a941b98a6cca524a92ab046f04b5d2c0a13ed28.tar.bz2
gentoo-2a941b98a6cca524a92ab046f04b5d2c0a13ed28.zip
media-video/dvdstyler: fix build with ffmpeg git master.
Package-Manager: portage-2.2.20.1
-rw-r--r--media-video/dvdstyler/dvdstyler-2.9.3.ebuild3
-rw-r--r--media-video/dvdstyler/files/ffmpeg29.patch31
2 files changed, 33 insertions, 1 deletions
diff --git a/media-video/dvdstyler/dvdstyler-2.9.3.ebuild b/media-video/dvdstyler/dvdstyler-2.9.3.ebuild
index c5bc193a50f9..914cefef65d9 100644
--- a/media-video/dvdstyler/dvdstyler-2.9.3.ebuild
+++ b/media-video/dvdstyler/dvdstyler-2.9.3.ebuild
@@ -7,7 +7,7 @@ EAPI=5
MY_P=${P/dvds/DVDS}
WX_GTK_VER=2.8
-inherit wxwidgets
+inherit wxwidgets eutils
DESCRIPTION="A cross-platform free DVD authoring application"
HOMEPAGE="http://www.dvdstyler.org/"
@@ -51,6 +51,7 @@ src_prepare() {
sed -i \
-e '/Icon/s:.png::' -e '/^Encoding/d' -e '/Categories/s:Application;::' \
data/dvdstyler.desktop || die
+ has_version '>=media-video/ffmpeg-2.9' && epatch "${FILESDIR}/ffmpeg29.patch"
}
src_configure() {
diff --git a/media-video/dvdstyler/files/ffmpeg29.patch b/media-video/dvdstyler/files/ffmpeg29.patch
new file mode 100644
index 000000000000..22ab9a6451da
--- /dev/null
+++ b/media-video/dvdstyler/files/ffmpeg29.patch
@@ -0,0 +1,31 @@
+Index: DVDStyler-2.9.3/src/mediaenc_ffmpeg.cpp
+===================================================================
+--- DVDStyler-2.9.3.orig/src/mediaenc_ffmpeg.cpp
++++ DVDStyler-2.9.3/src/mediaenc_ffmpeg.cpp
+@@ -178,7 +178,7 @@ bool wxFfmpegMediaEncoder::addVideoStrea
+ c->time_base.den = isNTSC(videoFormat) ? 30000 : 25;
+ c->time_base.num = isNTSC(videoFormat) ? 1001 : 1;
+ c->gop_size = isNTSC(videoFormat) ? 15 : 12;
+- c->pix_fmt = PIX_FMT_YUV420P;
++ c->pix_fmt = AV_PIX_FMT_YUV420P;
+ c->rc_buffer_size = VIDEO_BUF_SIZE;
+ c->rc_max_rate = 9000000;
+ c->rc_min_rate = 0;
+@@ -279,7 +279,7 @@ void wxFfmpegMediaEncoder::CloseAudioEnc
+ m_audioStm = NULL;
+ }
+
+-AVFrame* allocPicture(PixelFormat pix_fmt, int width, int height) {
++AVFrame* allocPicture(AVPixelFormat pix_fmt, int width, int height) {
+ AVFrame* frame = av_frame_alloc();
+ if (!frame)
+ return NULL;
+@@ -318,7 +318,7 @@ bool wxFfmpegMediaEncoder::OpenVideoEnco
+ return false;
+ }
+
+- m_imgConvertCtx = sws_getContext(c->width, c->height, PIX_FMT_RGB24, c->width, c->height, c->pix_fmt, SWS_BICUBIC,
++ m_imgConvertCtx = sws_getContext(c->width, c->height, AV_PIX_FMT_RGB24, c->width, c->height, c->pix_fmt, SWS_BICUBIC,
+ NULL, NULL, NULL);
+ if (!m_imgConvertCtx) {
+ wxLogError(wxT("Cannot initialize the conversion context"));