Control: tags -1 patch fixed-upstream Hi,
On 24/04/18 16:15, James Cowgill wrote: > Control: reopen -1 9.0.0+dfsg5-4 > > Hi, > > On Fri, 23 Mar 2018 20:13:24 +0100 Jose Luis Rivero > <jriv...@openrobotics.org> wrote: >> Code in gazebo9 should be compatible with ffmpeg 4.0 > > Gazebo 9.0.0+dfsg5-4 FTBFS against ffmpeg 4.0 in another test rebuild I > just ran. > > https://people.debian.org/~jcowgill/ffmpeg-4.0-20180424/gazebo_amd64-2018-04-23T16:03:04Z.build > >> /<<BUILDDIR>>/gazebo-9.0.0+dfsg5/gazebo/common/AudioDecoder.cc: In member >> function 'bool gazebo::common::AudioDecoder::SetFile(const string&)': >> /<<BUILDDIR>>/gazebo-9.0.0+dfsg5/gazebo/common/AudioDecoder.cc:258:35: >> error: 'CODEC_CAP_TRUNCATED' was not declared in this scope >> if (this->codec->capabilities & CODEC_CAP_TRUNCATED) >> ^~~~~~~~~~~~~~~~~~~ >> /<<BUILDDIR>>/gazebo-9.0.0+dfsg5/gazebo/common/AudioDecoder.cc:258:35: note: >> suggested alternative: 'AV_CODEC_CAP_TRUNCATED' >> if (this->codec->capabilities & CODEC_CAP_TRUNCATED) >> ^~~~~~~~~~~~~~~~~~~ >> AV_CODEC_CAP_TRUNCATED >> /<<BUILDDIR>>/gazebo-9.0.0+dfsg5/gazebo/common/AudioDecoder.cc:259:30: >> error: 'CODEC_FLAG_TRUNCATED' was not declared in this scope >> this->codecCtx->flags |= CODEC_FLAG_TRUNCATED; >> ^~~~~~~~~~~~~~~~~~~~ >> /<<BUILDDIR>>/gazebo-9.0.0+dfsg5/gazebo/common/AudioDecoder.cc:259:30: note: >> suggested alternative: 'AV_CODEC_FLAG_TRUNCATED' >> this->codecCtx->flags |= CODEC_FLAG_TRUNCATED; >> ^~~~~~~~~~~~~~~~~~~~ >> AV_CODEC_FLAG_TRUNCATED >> make[3]: *** [gazebo/common/CMakeFiles/gazebo_common.dir/build.make:114: >> gazebo/common/CMakeFiles/gazebo_common.dir/AudioDecoder.cc.o] Error 1 The attached patch (from upstream) fixes these issues. James
Description: Fix FTBFS with FFmpeg 4.0 Author: Steve Peters <scpet...@openrobotics.org> Origin: upstream, https://bitbucket.org/osrf/gazebo/commits/0c6e09de8c20d8465b59a364dbb887c462f72afa Bug-Debian: https://bugs.debian.org/888365 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/gazebo/common/AudioDecoder.cc +++ b/gazebo/common/AudioDecoder.cc @@ -255,8 +255,13 @@ bool AudioDecoder::SetFile(const std::st return false; } +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100) + if (this->codec->capabilities & AV_CODEC_CAP_TRUNCATED) + this->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED; +#else if (this->codec->capabilities & CODEC_CAP_TRUNCATED) this->codecCtx->flags |= CODEC_FLAG_TRUNCATED; +#endif // Open codec if (avcodec_open2(this->codecCtx, this->codec, nullptr) < 0) --- a/gazebo/common/Video.cc +++ b/gazebo/common/Video.cc @@ -143,8 +143,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->codecCtx->flags |= AV_CODEC_FLAG_TRUNCATED; +#else if (codec->capabilities & CODEC_CAP_TRUNCATED) this->codecCtx->flags |= CODEC_FLAG_TRUNCATED; +#endif // Open codec if (avcodec_open2(this->codecCtx, codec, nullptr) < 0)
signature.asc
Description: OpenPGP digital signature