Control: tags -1 patch fixed-upstream Hi,
On Tue, 24 Apr 2018 16:26:55 +0100 James Cowgill <jcowg...@debian.org> wrote: > Source: ignition-common > Version: 1.0.1-1 > Severity: important > User: debian-multime...@lists.debian.org > Usertags: ffmpeg-4.0-transition > > Hi, > > Your package FTBFS with version 4.0 of FFmpeg. This is fixed in 1.1.1. I have also attached a patch containing the fix which applies to 1.0.1. James
Description: Fix FTBFS with FFmpeg 4.0 Origin: upstream, https://bitbucket.org/ignitionrobotics/ign-common/commits/89d45a69d76e Bug: https://bitbucket.org/ignitionrobotics/ign-common/pull-requests/120 Bug-Debian: https://bugs.debian.org/896824 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/AudioDecoder.cc +++ b/src/AudioDecoder.cc @@ -257,8 +257,13 @@ bool AudioDecoder::SetFile(const std::st return false; } +#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; +#else if (this->data->codec->capabilities & CODEC_CAP_TRUNCATED) this->data->codecCtx->flags |= CODEC_FLAG_TRUNCATED; +#endif // Open codec if (avcodec_open2(this->data->codecCtx, this->data->codec, nullptr) < 0) --- a/src/Util.cc +++ b/src/Util.cc @@ -291,8 +291,10 @@ void ignition::common::load() if (first) { first = false; +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100) avcodec_register_all(); av_register_all(); +#endif #if defined(__linux__) && defined(HAVE_AVDEVICE) avdevice_register_all(); --- a/src/Video.cc +++ b/src/Video.cc @@ -164,8 +164,13 @@ 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 LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100) + if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) + this->dataPtr->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED; +#else if (codec->capabilities & CODEC_CAP_TRUNCATED) this->dataPtr->codecCtx->flags |= CODEC_FLAG_TRUNCATED; +#endif // Open codec if (avcodec_open2(this->dataPtr->codecCtx, codec, nullptr) < 0)
signature.asc
Description: OpenPGP digital signature
-- debian-science-maintainers mailing list debian-science-maintainers@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers