mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-electronics/gazebo: fix build with ffmpeg 4
Package-Manager: Portage-2.3.30, Repoman-2.3.9
This commit is contained in:
30
sci-electronics/gazebo/files/ffmpeg4.patch
Normal file
30
sci-electronics/gazebo/files/ffmpeg4.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
Index: gazebo-9.0.0/gazebo/common/AudioDecoder.cc
|
||||
===================================================================
|
||||
--- gazebo-9.0.0.orig/gazebo/common/AudioDecoder.cc
|
||||
+++ gazebo-9.0.0/gazebo/common/AudioDecoder.cc
|
||||
@@ -255,8 +255,8 @@ bool AudioDecoder::SetFile(const std::st
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (this->codec->capabilities & CODEC_CAP_TRUNCATED)
|
||||
- this->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
|
||||
+ if (this->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
+ this->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
|
||||
// Open codec
|
||||
if (avcodec_open2(this->codecCtx, this->codec, nullptr) < 0)
|
||||
Index: gazebo-9.0.0/gazebo/common/Video.cc
|
||||
===================================================================
|
||||
--- gazebo-9.0.0.orig/gazebo/common/Video.cc
|
||||
+++ gazebo-9.0.0/gazebo/common/Video.cc
|
||||
@@ -143,8 +143,8 @@ bool Video::Load(const std::string &_fil
|
||||
|
||||
// Inform the codec that we can handle truncated bitstreams -- i.e.,
|
||||
// bitstreams where frame boundaries can fall in the middle of packets
|
||||
- if (codec->capabilities & CODEC_CAP_TRUNCATED)
|
||||
- this->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
|
||||
+ if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
|
||||
+ this->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
|
||||
// Open codec
|
||||
if (avcodec_open2(this->codecCtx, codec, nullptr) < 0)
|
||||
@@ -57,7 +57,7 @@ DEPEND="${RDEPEND}
|
||||
test? ( dev-libs/libxslt )
|
||||
"
|
||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
PATCHES=( "${FILESDIR}/qwt.patch" )
|
||||
PATCHES=( "${FILESDIR}/qwt.patch" "${FILESDIR}/ffmpeg4.patch" )
|
||||
|
||||
src_configure() {
|
||||
# doesnt build without it
|
||||
|
||||
Reference in New Issue
Block a user