mirror of
https://github.com/Fishwaldo/meta-pine64.git
synced 2025-03-15 19:41:59 +00:00
Small Updates
This commit is contained in:
parent
1fadd73762
commit
ceeae8fc34
6 changed files with 1969 additions and 162 deletions
|
@ -1,9 +1,10 @@
|
|||
SUMMARY = "Install a InitRamFS enabled FitImage"
|
||||
LICENSE = "CLOSED"
|
||||
LICENSE = "MIT"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
SRC_URI = " \
|
||||
file://checkfitimage.sh \
|
||||
"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
inherit kernel-artifact-names module-base
|
||||
|
||||
|
|
1761
recipes-multimedia/ffmpeg/ffmpeg/0002-add-Starfive-OMX-patches.patch
Normal file
1761
recipes-multimedia/ffmpeg/ffmpeg/0002-add-Starfive-OMX-patches.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,36 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append:riscv64 = "\
|
||||
file://0001-fix-chromium.patch \
|
||||
file://0002-add-Starfive-OMX-patches.patch \
|
||||
"
|
||||
#file://0001-fix-chromium.patch
|
||||
|
||||
|
||||
EXTRA_OECONF:append = " \
|
||||
--enable-omx \
|
||||
--cpu="rv64imafd" \
|
||||
--extra-libs="-lOMX_Core" \
|
||||
--extra-cflags="-I${STAGING_DIR_TARGET}/usr/include/khronos/" \
|
||||
--enable-ffplay \
|
||||
"
|
||||
|
||||
PACKAGECONFIG:append = " \
|
||||
openssl \
|
||||
"
|
||||
vaapi \
|
||||
bzlib \
|
||||
libopus \
|
||||
libvorbis \
|
||||
lzma \
|
||||
openssl \
|
||||
theora \
|
||||
vdpau \
|
||||
x264 \
|
||||
gpl \
|
||||
sdl2 \
|
||||
"
|
||||
|
||||
DEPENDS:append = " \
|
||||
libsf-omxil \
|
||||
"
|
||||
|
||||
#./configure --enable-nonfree --disable-static --enable-alsa --disable-altivec --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-bzlib --disable-libfdk-aac --disable-libgsm --disable-indev=jack --disable-libopus --disable-libvorbis --enable-lzma --disable-libmfx --disable-mipsdsp --disable-mipsdspr2 --disable-libmp3lame --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --disable-libspeex --disable-libsrt --disable-stripping --enable-swresample --enable-swscale --enable-libtheora --enable-vaapi --enable-vdpau --disable-libvpx --enable-libx264 --disable-libx265 --enable-libxcb --enable-outdev=xv --enable-zlib --enable-omx --prefix=$CURDIR/target/usr --arch="riscv64" --target-os="linux" --extra-cflags="-I/usr/include/khronos/" --enable-gpl --extra-libs="-lOMX_Core" --enable-ffplay
|
177
recipes-multimedia/ffmpeg/ffmpeg_4.4.4.bb
Normal file
177
recipes-multimedia/ffmpeg/ffmpeg_4.4.4.bb
Normal file
|
@ -0,0 +1,177 @@
|
|||
SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
|
||||
DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
|
||||
mux, demux, stream, filter and play pretty much anything that humans and machines \
|
||||
have created. It supports the most obscure ancient formats up to the cutting edge."
|
||||
HOMEPAGE = "https://www.ffmpeg.org/"
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG"
|
||||
LICENSE:${PN} = "GPL-2.0-or-later"
|
||||
LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libpostproc = "GPL-2.0-or-later"
|
||||
LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
|
||||
LICENSE_FLAGS = "commercial"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
|
||||
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
|
||||
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
||||
|
||||
SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "e80b380d595c809060f66f96a5d849511ef4a76a26b76eacf5778b94c3570309"
|
||||
|
||||
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
|
||||
ARM_INSTRUCTION_SET:armv4 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
ARM_INSTRUCTION_SET:armv6 = "arm"
|
||||
|
||||
# Should be API compatible with libav (which was a fork of ffmpeg)
|
||||
# libpostproc was previously packaged from a separate recipe
|
||||
PROVIDES = "libav libpostproc"
|
||||
|
||||
DEPENDS = "nasm-native"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
|
||||
alsa bzlib lzma pic pthreads shared theora zlib \
|
||||
${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
|
||||
|
||||
# libraries to build in addition to avutil
|
||||
PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
|
||||
PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
|
||||
PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
|
||||
PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
|
||||
PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
|
||||
PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
|
||||
PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
|
||||
|
||||
# features to support
|
||||
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
|
||||
PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
|
||||
PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
|
||||
PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
|
||||
PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
|
||||
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
|
||||
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
|
||||
PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
|
||||
PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
|
||||
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
|
||||
PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
|
||||
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
|
||||
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
|
||||
PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
|
||||
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
|
||||
PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
|
||||
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
|
||||
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
|
||||
PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
|
||||
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
|
||||
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
|
||||
PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265"
|
||||
PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
|
||||
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
|
||||
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
|
||||
|
||||
# other configuration options
|
||||
PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2"
|
||||
PACKAGECONFIG[pic] = "--enable-pic"
|
||||
PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads"
|
||||
PACKAGECONFIG[shared] = "--enable-shared"
|
||||
PACKAGECONFIG[strip] = ",--disable-stripping"
|
||||
|
||||
# Check codecs that require --enable-nonfree
|
||||
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
|
||||
|
||||
def cpu(d):
|
||||
for arg in (d.getVar('TUNE_CCARGS') or '').split():
|
||||
if arg.startswith('-mcpu='):
|
||||
return arg[6:]
|
||||
return 'generic'
|
||||
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
|
||||
\
|
||||
--cross-prefix=${TARGET_PREFIX} \
|
||||
\
|
||||
--ld='${CCLD}' \
|
||||
--cc='${CC}' \
|
||||
--cxx='${CXX}' \
|
||||
--arch=${TARGET_ARCH} \
|
||||
--target-os='linux' \
|
||||
--enable-cross-compile \
|
||||
--extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
|
||||
--extra-ldflags='${LDFLAGS}' \
|
||||
--sysroot='${STAGING_DIR_TARGET}' \
|
||||
${EXTRA_FFCONF} \
|
||||
--libdir=${libdir} \
|
||||
--shlibdir=${libdir} \
|
||||
--datadir=${datadir}/ffmpeg \
|
||||
--cpu=${@cpu(d)} \
|
||||
--pkg-config=pkg-config \
|
||||
"
|
||||
|
||||
EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
|
||||
|
||||
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
|
||||
EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
|
||||
--disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa"
|
||||
EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic"
|
||||
EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
|
||||
EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
|
||||
|
||||
# gold crashes on x86, another solution is to --disable-asm but thats more hacky
|
||||
# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
|
||||
|
||||
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
|
||||
|
||||
EXTRA_OEMAKE = "V=1"
|
||||
|
||||
do_configure() {
|
||||
${S}/configure ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
# patch out build host paths for reproducibility
|
||||
do_compile:prepend:class-target() {
|
||||
sed -i -e "s,${WORKDIR},,g" ${B}/config.h
|
||||
}
|
||||
|
||||
PACKAGES =+ "libavcodec \
|
||||
libavdevice \
|
||||
libavfilter \
|
||||
libavformat \
|
||||
libavutil \
|
||||
libpostproc \
|
||||
libswresample \
|
||||
libswscale"
|
||||
|
||||
FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}"
|
||||
FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
|
||||
FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
|
||||
FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
|
||||
FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
|
||||
FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
|
||||
FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
|
||||
FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
|
||||
|
||||
# ffmpeg disables PIC on some platforms (e.g. x86-32)
|
||||
INSANE_SKIP:${MLPREFIX}libavcodec = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libavdevice = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libavfilter = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libavformat = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libavutil = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libswscale = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libswresample = "textrel"
|
||||
INSANE_SKIP:${MLPREFIX}libpostproc = "textrel"
|
|
@ -7,15 +7,6 @@ Subject: [PATCH 8/8] some fixes for external ffmpeg and riscv64 builds
|
|||
chromium/build/config/posix/BUILD.gn | 2 +-
|
||||
.../build/linux/sysroot_scripts/install-sysroot.py | 3 ++-
|
||||
chromium/cc/base/list_container_helper.h | 1 +
|
||||
chromium/media/ffmpeg/ffmpeg_common.h | 1 +
|
||||
chromium/media/filters/audio_file_reader.cc | 2 +-
|
||||
chromium/media/filters/ffmpeg_audio_decoder.cc | 2 +-
|
||||
chromium/media/filters/ffmpeg_demuxer.cc | 12 ++++++------
|
||||
chromium/media/filters/ffmpeg_glue.cc | 4 ----
|
||||
chromium/media/filters/ffmpeg_video_decoder.cc | 2 +-
|
||||
chromium/media/filters/media_file_checker.cc | 2 +-
|
||||
.../video_coding/codecs/h264/h264_decoder_impl.cc | 2 +-
|
||||
11 files changed, 16 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/chromium/build/config/posix/BUILD.gn b/chromium/build/config/posix/BUILD.gn
|
||||
index e61554c5656..06f551ad8db 100644
|
||||
|
@ -62,156 +53,6 @@ index 9e65013cbdb..8890e66f972 100644
|
|||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
diff --git a/chromium/media/ffmpeg/ffmpeg_common.h b/chromium/media/ffmpeg/ffmpeg_common.h
|
||||
index 2734a485cbd..70b1877a43c 100644
|
||||
--- a/chromium/media/ffmpeg/ffmpeg_common.h
|
||||
+++ b/chromium/media/ffmpeg/ffmpeg_common.h
|
||||
@@ -29,6 +29,7 @@ extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavformat/avio.h>
|
||||
#include <libavutil/avutil.h>
|
||||
+#include <libavutil/channel_layout.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libavutil/log.h>
|
||||
#include <libavutil/mastering_display_metadata.h>
|
||||
diff --git a/chromium/media/filters/audio_file_reader.cc b/chromium/media/filters/audio_file_reader.cc
|
||||
index cb81d920def..bd73908d0ca 100644
|
||||
--- a/chromium/media/filters/audio_file_reader.cc
|
||||
+++ b/chromium/media/filters/audio_file_reader.cc
|
||||
@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() {
|
||||
}
|
||||
|
||||
bool AudioFileReader::OpenDecoder() {
|
||||
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
if (codec) {
|
||||
// MP3 decodes to S16P which we don't support, tell it to use S16 instead.
|
||||
if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P)
|
||||
diff --git a/chromium/media/filters/ffmpeg_audio_decoder.cc b/chromium/media/filters/ffmpeg_audio_decoder.cc
|
||||
index 0d825ed791b..72fac6167ef 100644
|
||||
--- a/chromium/media/filters/ffmpeg_audio_decoder.cc
|
||||
+++ b/chromium/media/filters/ffmpeg_audio_decoder.cc
|
||||
@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
|
||||
}
|
||||
}
|
||||
|
||||
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
if (!codec ||
|
||||
avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) {
|
||||
DLOG(ERROR) << "Could not initialize audio decoder: "
|
||||
diff --git a/chromium/media/filters/ffmpeg_demuxer.cc b/chromium/media/filters/ffmpeg_demuxer.cc
|
||||
index d34db63f3ef..427565b00c1 100644
|
||||
--- a/chromium/media/filters/ffmpeg_demuxer.cc
|
||||
+++ b/chromium/media/filters/ffmpeg_demuxer.cc
|
||||
@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
|
||||
// Next try to use the first DTS value, for codecs where we know PTS == DTS
|
||||
// (excludes all H26x codecs). The start time must be returned in PTS.
|
||||
- if (stream->first_dts != kNoFFmpegTimestamp &&
|
||||
+ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
|
||||
const base::TimeDelta first_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, stream->first_dts);
|
||||
+ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
|
||||
if (first_pts < start_time)
|
||||
start_time = first_pts;
|
||||
}
|
||||
@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
scoped_refptr<DecoderBuffer> buffer;
|
||||
|
||||
if (type() == DemuxerStream::TEXT) {
|
||||
- int id_size = 0;
|
||||
+ size_t id_size = 0;
|
||||
uint8_t* id_data = av_packet_get_side_data(
|
||||
packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
|
||||
|
||||
- int settings_size = 0;
|
||||
+ size_t settings_size = 0;
|
||||
uint8_t* settings_data = av_packet_get_side_data(
|
||||
packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
|
||||
|
||||
@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
|
||||
side_data.data(), side_data.size());
|
||||
} else {
|
||||
- int side_data_size = 0;
|
||||
+ size_t side_data_size = 0;
|
||||
uint8_t* side_data = av_packet_get_side_data(
|
||||
packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
|
||||
|
||||
@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
packet->size - data_offset);
|
||||
}
|
||||
|
||||
- int skip_samples_size = 0;
|
||||
+ size_t skip_samples_size = 0;
|
||||
const uint32_t* skip_samples_ptr =
|
||||
reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
|
||||
packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
|
||||
diff --git a/chromium/media/filters/ffmpeg_glue.cc b/chromium/media/filters/ffmpeg_glue.cc
|
||||
index 0ef3521473d..8483ecc348f 100644
|
||||
--- a/chromium/media/filters/ffmpeg_glue.cc
|
||||
+++ b/chromium/media/filters/ffmpeg_glue.cc
|
||||
@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) {
|
||||
}
|
||||
|
||||
void FFmpegGlue::InitializeFFmpeg() {
|
||||
- av_register_all();
|
||||
}
|
||||
|
||||
static void LogContainer(bool is_local_file,
|
||||
@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
|
||||
// Enable fast, but inaccurate seeks for MP3.
|
||||
format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
|
||||
|
||||
- // Ensures we can read out various metadata bits like vp8 alpha.
|
||||
- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
|
||||
-
|
||||
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
|
||||
// instances were real failures. Solves bugs like http://crbug.com/710791.
|
||||
format_context_->error_recognition |= AV_EF_EXPLODE;
|
||||
diff --git a/chromium/media/filters/ffmpeg_video_decoder.cc b/chromium/media/filters/ffmpeg_video_decoder.cc
|
||||
index ef12477ee89..7996606f5f9 100644
|
||||
--- a/chromium/media/filters/ffmpeg_video_decoder.cc
|
||||
+++ b/chromium/media/filters/ffmpeg_video_decoder.cc
|
||||
@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
|
||||
if (decode_nalus_)
|
||||
codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
|
||||
|
||||
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
|
||||
if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
|
||||
ReleaseFFmpegResources();
|
||||
return false;
|
||||
diff --git a/chromium/media/filters/media_file_checker.cc b/chromium/media/filters/media_file_checker.cc
|
||||
index 59c2a2fc618..1a9872c7acb 100644
|
||||
--- a/chromium/media/filters/media_file_checker.cc
|
||||
+++ b/chromium/media/filters/media_file_checker.cc
|
||||
@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) {
|
||||
auto context = AVStreamToAVCodecContext(format_context->streams[i]);
|
||||
if (!context)
|
||||
continue;
|
||||
- AVCodec* codec = avcodec_find_decoder(cp->codec_id);
|
||||
+ const AVCodec* codec = avcodec_find_decoder(cp->codec_id);
|
||||
if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) {
|
||||
auto loop = std::make_unique<FFmpegDecodingLoop>(context.get());
|
||||
stream_contexts[i] = {std::move(context), std::move(loop)};
|
||||
diff --git a/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
|
||||
index 9002b874611..d12fade8b63 100644
|
||||
--- a/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
|
||||
+++ b/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
|
||||
@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
|
||||
// a pointer |this|.
|
||||
av_context_->opaque = this;
|
||||
|
||||
- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
|
||||
+ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
|
||||
if (!codec) {
|
||||
// This is an indication that FFmpeg has not been initialized or it has not
|
||||
// been compiled/initialized with the correct set of codecs.
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue