Date: Fri, 27 Apr 2018 05:09:11 +0000 (UTC) From: "Tobias C. Berner" <tcberner@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r468397 - in head/www/qt5-webengine: . files Message-ID: <201804270509.w3R59BZs049486@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tcberner Date: Fri Apr 27 05:09:11 2018 New Revision: 468397 URL: https://svnweb.freebsd.org/changeset/ports/468397 Log: www/qt5-webengine: prepare for ffmpeg4 Add patch obtained from Arch Linux: https://git.archlinux.org/svntogit/packages.git/tree/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26 PR: 227745 Reported by: jbeich Added: head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 (contents, props changed) Modified: head/www/qt5-webengine/Makefile Modified: head/www/qt5-webengine/Makefile ============================================================================== --- head/www/qt5-webengine/Makefile Fri Apr 27 03:54:08 2018 (r468396) +++ head/www/qt5-webengine/Makefile Fri Apr 27 05:09:11 2018 (r468397) @@ -16,7 +16,7 @@ PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www PKGNAMEPREFIX= qt5- Added: head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 Fri Apr 27 05:09:11 2018 (r468397) @@ -0,0 +1,86 @@ +Fix build with ffmpeg-4.x + +Obtained from: +https://git.archlinux.org/svntogit/packages.git/tree/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26 + +--- src/3rdparty/chromium/media/base/decoder_buffer.h.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/base/decoder_buffer.h +@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer + : public base::RefCountedThreadSafe<DecoderBuffer> { + public: + enum { +- kPaddingSize = 32, ++ kPaddingSize = 64, + #if defined(ARCH_CPU_ARM_FAMILY) + kAlignmentSize = 16 + #else +--- src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* s + + } // namespace + +-// Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are ++// Why AV_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are + // padded. Check here to ensure FFmpeg only receives data padded to its + // specifications. +-static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE, ++static_assert(DecoderBuffer::kPaddingSize >= AV_INPUT_BUFFER_PADDING_SIZE, + "DecoderBuffer padding size does not fit ffmpeg requirement"); + + // Alignment requirement by FFmpeg for input and output buffers. This need to +@@ -429,11 +429,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDec + } else { + codec_context->extradata_size = config.extra_data().size(); + codec_context->extradata = reinterpret_cast<uint8_t*>( +- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); ++ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); + memcpy(codec_context->extradata, &config.extra_data()[0], + config.extra_data().size()); + memset(codec_context->extradata + config.extra_data().size(), '\0', +- FF_INPUT_BUFFER_PADDING_SIZE); ++ AV_INPUT_BUFFER_PADDING_SIZE); + } + } + +@@ -561,11 +561,11 @@ void VideoDecoderConfigToAVCodecContext( + } else { + codec_context->extradata_size = config.extra_data().size(); + codec_context->extradata = reinterpret_cast<uint8_t*>( +- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); ++ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); + memcpy(codec_context->extradata, &config.extra_data()[0], + config.extra_data().size()); + memset(codec_context->extradata + config.extra_data().size(), '\0', +- FF_INPUT_BUFFER_PADDING_SIZE); ++ AV_INPUT_BUFFER_PADDING_SIZE); + } + } + +--- src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -53,7 +53,7 @@ static void ReleaseAudioBufferImpl(void* opaque, uint8 + // AVCodecContext.opaque to get the object reference in order to call + // GetAudioBuffer() to do the actual allocation. + static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) { +- DCHECK(s->codec->capabilities & CODEC_CAP_DR1); ++ DCHECK(s->codec->capabilities & AV_CODEC_CAP_DR1); + DCHECK_EQ(s->codec_type, AVMEDIA_TYPE_AUDIO); + + // Since this routine is called by FFmpeg when a buffer is required for audio +--- src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -415,12 +415,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(bool low_del + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); + codec_context_->opaque = this; +- codec_context_->flags |= CODEC_FLAG_EMU_EDGE; + codec_context_->get_buffer2 = GetVideoBufferImpl; + codec_context_->refcounted_frames = 1; + + if (decode_nalus_) +- codec_context_->flags2 |= CODEC_FLAG2_CHUNKS; ++ codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; + + AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804270509.w3R59BZs049486>