summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/vbam/ChangeLog6
-rw-r--r--games-emulation/vbam/files/vbam-1.8.0.1228-ffmpeg2.patch34
-rw-r--r--games-emulation/vbam/vbam-1.8.0.1228.ebuild3
3 files changed, 41 insertions, 2 deletions
diff --git a/games-emulation/vbam/ChangeLog b/games-emulation/vbam/ChangeLog
index 414334ca2b2d..24f2a1bd237f 100644
--- a/games-emulation/vbam/ChangeLog
+++ b/games-emulation/vbam/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-emulation/vbam
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/vbam/ChangeLog,v 1.22 2014/02/05 09:57:45 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/vbam/ChangeLog,v 1.23 2014/05/04 16:28:45 radhermit Exp $
+
+ 04 May 2014; Tim Harder <radhermit@gentoo.org> vbam-1.8.0.1228.ebuild,
+ +files/vbam-1.8.0.1228-ffmpeg2.patch:
+ Fix build with =media-video/ffmpeg-2* (bug #476496, patch by aballier).
*vbam-1.8.0.1228 (05 Feb 2014)
diff --git a/games-emulation/vbam/files/vbam-1.8.0.1228-ffmpeg2.patch b/games-emulation/vbam/files/vbam-1.8.0.1228-ffmpeg2.patch
new file mode 100644
index 000000000000..f2f9085f4a7f
--- /dev/null
+++ b/games-emulation/vbam/files/vbam-1.8.0.1228-ffmpeg2.patch
@@ -0,0 +1,34 @@
+--- vbam-1.8.0.1228/src/common/ffmpeg.cpp
++++ vbam-1.8.0.1228/src/common/ffmpeg.cpp
+@@ -178,17 +178,31 @@ MediaRet MediaRecorder::setup_video_stre
+ // make sure RGB is supported (mostly not)
+ if(codec->pix_fmts) {
+ const enum PixelFormat *p;
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ int64_t mask = 0;
++#endif
+ for(p = codec->pix_fmts; *p != -1; p++) {
+ // may get complaints about 1LL; thus the cast
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ mask |= ((int64_t)1) << *p;
++#endif
+ if(*p == pixfmt)
+ break;
+ }
+ if(*p == -1) {
+ // if not supported, use a converter to the next best format
+ // this is swscale, the converter used by the output demo
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ enum PixelFormat dp = (PixelFormat)avcodec_find_best_pix_fmt(mask, pixfmt, 0, NULL);
++#else
++#if LIBAVCODEC_VERSION_MICRO >= 100
++// FFmpeg
++ enum AVPixelFormat dp = avcodec_find_best_pix_fmt_of_list(codec->pix_fmts, pixfmt, 0, NULL);
++#else
++// Libav
++ enum AVPixelFormat dp = avcodec_find_best_pix_fmt2(codec->pix_fmts, pixfmt, 0, NULL);
++#endif
++#endif
+ if(dp == -1)
+ dp = codec->pix_fmts[0];
+ if(!(convpic = avcodec_alloc_frame()) ||
diff --git a/games-emulation/vbam/vbam-1.8.0.1228.ebuild b/games-emulation/vbam/vbam-1.8.0.1228.ebuild
index 59779c72f2d0..b72b2f2594fc 100644
--- a/games-emulation/vbam/vbam-1.8.0.1228.ebuild
+++ b/games-emulation/vbam/vbam-1.8.0.1228.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/vbam/vbam-1.8.0.1228.ebuild,v 1.1 2014/02/05 09:57:45 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/vbam/vbam-1.8.0.1228.ebuild,v 1.2 2014/05/04 16:28:45 radhermit Exp $
EAPI=5
WX_GTK_VER="3.0"
@@ -44,6 +44,7 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
+ epatch "${FILESDIR}"/${P}-ffmpeg2.patch
epatch "${FILESDIR}"/${P}-header.patch
# fix issue with zlib-1.2.5.1 macros (bug #383179)