aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/dvdstyler
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-05-04 02:38:06 +0800
committerJan Beich <jbeich@FreeBSD.org>2018-05-04 02:38:06 +0800
commit0665a3d4b954afbee4d1d456fcf8333d0cca9057 (patch)
tree5b3f7ae143a2cafa594507f1f6b07796f5505b74 /multimedia/dvdstyler
parent6ef6f354daed572ae01f973960dbc15a92ca5967 (diff)
downloadfreebsd-ports-gnome-0665a3d4b954afbee4d1d456fcf8333d0cca9057.tar.gz
freebsd-ports-gnome-0665a3d4b954afbee4d1d456fcf8333d0cca9057.tar.zst
freebsd-ports-gnome-0665a3d4b954afbee4d1d456fcf8333d0cca9057.zip
multimedia/dvdstyler: unbreak with ffmpeg 4.0
mediaenc_ffmpeg.cpp:215:18: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' c->flags |= CODEC_FLAG_GLOBAL_HEADER; ^ PR: 227726 Reported by: antoine (via exp-run)
Diffstat (limited to 'multimedia/dvdstyler')
-rw-r--r--multimedia/dvdstyler/Makefile2
-rw-r--r--multimedia/dvdstyler/files/patch-src_mediaenc__ffmpeg.cpp25
2 files changed, 25 insertions, 2 deletions
diff --git a/multimedia/dvdstyler/Makefile b/multimedia/dvdstyler/Makefile
index 9fea7881b515..93bc5a8738bf 100644
--- a/multimedia/dvdstyler/Makefile
+++ b/multimedia/dvdstyler/Makefile
@@ -15,8 +15,6 @@ COMMENT= WxWidgets frontend to dvd recoding and authoring programs
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN= fails to build with ffmpeg 4.0
-
BUILD_DEPENDS= zip:archivers/zip \
wxsvg>=1.2:graphics/wxsvg \
dvdauthor:multimedia/dvdauthor \
diff --git a/multimedia/dvdstyler/files/patch-src_mediaenc__ffmpeg.cpp b/multimedia/dvdstyler/files/patch-src_mediaenc__ffmpeg.cpp
new file mode 100644
index 000000000000..0b41a21b37f1
--- /dev/null
+++ b/multimedia/dvdstyler/files/patch-src_mediaenc__ffmpeg.cpp
@@ -0,0 +1,25 @@
+mediaenc_ffmpeg.cpp:215:18: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ ^
+
+--- src/mediaenc_ffmpeg.cpp.orig 2015-10-04 13:18:58 UTC
++++ src/mediaenc_ffmpeg.cpp
+@@ -48,6 +48,9 @@ extern "C" {
+ #define av_frame_free avcodec_free_frame
+ #endif
+
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 34, 1)
++#define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
++#endif
+
+ wxFfmpegMediaEncoder::wxFfmpegMediaEncoder(int threadCount) {
+ m_threadCount = threadCount;
+@@ -212,7 +215,7 @@ bool wxFfmpegMediaEncoder::addAudioStream(int codecId)
+ 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;
+ }