qt5: add patch for ffmpeg-4.0.1.
This commit is contained in:
parent
72d6e20c0e
commit
20e3cb67f5
2 changed files with 87 additions and 1 deletions
86
srcpkgs/qt5/patches/qtwebengine-ffmpeg4.patch
Normal file
86
srcpkgs/qt5/patches/qtwebengine-ffmpeg4.patch
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
source: https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26
|
||||||
|
|
||||||
|
--- qtwebengine/src/3rdparty/chromium/media/base/decoder_buffer.h
|
||||||
|
+++ qtwebengine/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
|
||||||
|
|
||||||
|
--- qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
|
||||||
|
+++ qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
|
||||||
|
@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* stream) {
|
||||||
|
|
||||||
|
} // 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
|
||||||
|
@@ -444,11 +444,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
|
||||||
|
} 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -585,11 +585,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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
|
||||||
|
+++ qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
|
||||||
|
@@ -368,7 +368,7 @@ void FFmpegAudioDecoder::ResetTimestampState(const AudioDecoderConfig& config) {
|
||||||
|
int FFmpegAudioDecoder::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
|
||||||
|
|
||||||
|
--- qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
|
||||||
|
+++ qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
|
||||||
|
@@ -427,12 +427,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
|
||||||
|
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) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'qt5'
|
# Template file for 'qt5'
|
||||||
pkgname=qt5
|
pkgname=qt5
|
||||||
version=5.10.1
|
version=5.10.1
|
||||||
revision=8
|
revision=9
|
||||||
wrksrc="qt-everywhere-src-${version}"
|
wrksrc="qt-everywhere-src-${version}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
|
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue