summaryrefslogtreecommitdiff
path: root/sci-libs/ignition-common/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-29 21:54:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-03-29 21:54:14 +0100
commit911d13b08c9edf41dd5fd5f5e15c952ca1fc3b6c (patch)
tree98c9e54e57ca3eaa2b64cf2002fb8fc5a11620dd /sci-libs/ignition-common/files
parent822a054dd1bab7f8080ccd486398034b4ff0b97d (diff)
gentoo auto-resync : 29:03:2023 - 21:54:14
Diffstat (limited to 'sci-libs/ignition-common/files')
-rw-r--r--sci-libs/ignition-common/files/ffmpeg6.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/sci-libs/ignition-common/files/ffmpeg6.patch b/sci-libs/ignition-common/files/ffmpeg6.patch
new file mode 100644
index 000000000000..b4d61f181291
--- /dev/null
+++ b/sci-libs/ignition-common/files/ffmpeg6.patch
@@ -0,0 +1,40 @@
+Index: gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
+===================================================================
+--- gz-common-ignition-common3_3.14.2.orig/av/src/AudioDecoder.cc
++++ gz-common-ignition-common3_3.14.2/av/src/AudioDecoder.cc
+@@ -348,6 +348,7 @@ bool AudioDecoder::SetFile(const std::st
+ return false;
+ }
+
++#if LIBAVCODEC_VERSION_MAJOR < 60
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
+ if (this->data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+ this->data->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED;
+@@ -355,6 +356,7 @@ bool AudioDecoder::SetFile(const std::st
+ if (this->data->codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->data->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->data->codecCtx, this->data->codec, nullptr) < 0)
+Index: gz-common-ignition-common3_3.14.2/av/src/Video.cc
+===================================================================
+--- gz-common-ignition-common3_3.14.2.orig/av/src/Video.cc
++++ gz-common-ignition-common3_3.14.2/av/src/Video.cc
+@@ -179,6 +179,7 @@ bool Video::Load(const std::string &_fil
+ this->dataPtr->videoStream]->codec;
+ #endif
+
++#if LIBAVCODEC_VERSION_MAJOR < 60
+ // Inform the codec that we can handle truncated bitstreams -- i.e.,
+ // bitstreams where frame boundaries can fall in the middle of packets
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
+@@ -188,6 +189,7 @@ bool Video::Load(const std::string &_fil
+ if (codec->capabilities & CODEC_CAP_TRUNCATED)
+ this->dataPtr->codecCtx->flags |= CODEC_FLAG_TRUNCATED;
+ #endif
++#endif
+
+ // Open codec
+ if (avcodec_open2(this->dataPtr->codecCtx, codec, nullptr) < 0)