media-video/dvdstyler: fix build with ffmpeg4
authorAlexis Ballier <aballier@gentoo.org>
Fri, 20 Apr 2018 17:21:33 +0000 (19:21 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Fri, 20 Apr 2018 18:11:56 +0000 (20:11 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

media-video/dvdstyler/dvdstyler-3.0.4.ebuild
media-video/dvdstyler/files/ffmpeg4.patch [new file with mode: 0644]

index 668ddd64d8d357c0faf69d61c3ed7b4a25e29f84..3df313a5bb0d8634e1a81289fa016f4352318709 100644 (file)
@@ -46,6 +46,8 @@ DEPEND="${COMMON_DEPEND}
 S="${WORKDIR}/${MY_P}"
 
 src_prepare() {
+       epatch "${FILESDIR}/ffmpeg4.patch"
+
        need-wxwidgets unicode
        # disable obsolete GNOME 2.x libraries wrt #508854
        sed -i -e '/PKG_CONFIG/s:libgnomeui-2.0:dIsAbLeAuToMaGiC&:' configure || die
diff --git a/media-video/dvdstyler/files/ffmpeg4.patch b/media-video/dvdstyler/files/ffmpeg4.patch
new file mode 100644 (file)
index 0000000..39966dd
--- /dev/null
@@ -0,0 +1,13 @@
+Index: DVDStyler-3.0.4/src/mediaenc_ffmpeg.cpp
+===================================================================
+--- DVDStyler-3.0.4.orig/src/mediaenc_ffmpeg.cpp
++++ DVDStyler-3.0.4/src/mediaenc_ffmpeg.cpp
+@@ -223,7 +223,7 @@ bool wxFfmpegMediaEncoder::addAudioStrea
+       c->time_base = (AVRational){ 1, c->sample_rate };
+       // some formats want stream headers to be separate
+       if(m_outputCtx->oformat->flags & AVFMT_GLOBALHEADER)
+-          c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++          c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+       
+       return true;
+ }