mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
extra/chromium to 68.0.3440.75-1
This commit is contained in:
parent
e2a81fce54
commit
5853560442
5 changed files with 169 additions and 267 deletions
|
@ -13,9 +13,10 @@
|
|||
|
||||
buildarch=12
|
||||
highmem=1
|
||||
noautobuild=1
|
||||
|
||||
pkgname=chromium
|
||||
pkgver=67.0.3396.99
|
||||
pkgver=68.0.3440.75
|
||||
pkgrel=1
|
||||
_launcher_ver=6
|
||||
pkgdesc="A web browser built for speed, simplicity, and security"
|
||||
|
@ -33,19 +34,23 @@ optdepends=('kdialog: needed for file dialogs in KDE'
|
|||
install=chromium.install
|
||||
source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
|
||||
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
|
||||
remove-dependency-on-ffmpeg-internals-for-start-time.patch
|
||||
x11-fix-mixup-between-DIP-pixel-coordinates.patch
|
||||
blink-disable-XML-catalogs-at-runtime.patch
|
||||
chromium-cors-string-r0.patch
|
||||
chromium-ffmpeg-r1.patch
|
||||
chromium-libjpeg-r0.patch
|
||||
chromium-libwebp-shim-r0.patch
|
||||
chromium-widevine-r2.patch
|
||||
chromium-skia-harmony.patch
|
||||
0001-Ensure-all-targets-build-when-target_arch-arm-and-ta.patch)
|
||||
sha256sums=('452d6b9d8df6c88600aaeff3fad4c065574fd6dbee804e628b70e73a39c0a02a'
|
||||
sha256sums=('dc17783267853bdc0fb726363d2b8e30a0bf43b6cc2c768e1f37c92e8eb59541'
|
||||
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
|
||||
'2cc80f5ed8a9b42495a0f3ab3c1bae026b9081972269a1b6d407331d33f7d257'
|
||||
'e2c2754536243a60fa70541bbd4121715eccd83caa8f1fb1873bd994cd81f871'
|
||||
'98a5c41cf9687c52ee380d2b683c95387334c76254479c347bdb733646dab815'
|
||||
'f4141e48a25a1403250e9040c18936a16250ab707064dd54103066f40c7db41c'
|
||||
'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde'
|
||||
'6b8fc570607631d3558e99a82e92c11eeae9c960ebb0a83c13d46344d4b6adca'
|
||||
'b368f3827ee4c47c942085e3d2cfbea43f8899b101e01500dbf6a7b01b2b29e0'
|
||||
'02c69bb3954087db599def7f5b6d65cf8f7cf2ed81dfbdaa4bb7b51863b4df15'
|
||||
'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3'
|
||||
'9e4d63c582b316edaa550aae6fe6623f0df1a94c53f97bae4b0d7826e0779a32')
|
||||
|
@ -102,9 +107,6 @@ prepare() {
|
|||
# Allow build to set march and options on AArch64 (crc, crypto)
|
||||
[[ $CARCH == "aarch64" ]] && CFLAGS=`echo $CFLAGS | sed -e 's/-march=armv8-a//'` && CXXFLAGS="$CFLAGS"
|
||||
|
||||
# https://crbug.com/731766
|
||||
patch -Np1 -i ../remove-dependency-on-ffmpeg-internals-for-start-time.patch
|
||||
|
||||
# https://crbug.com/707721
|
||||
patch -Np1 -i ../x11-fix-mixup-between-DIP-pixel-coordinates.patch
|
||||
|
||||
|
@ -115,7 +117,10 @@ prepare() {
|
|||
patch -Np4 -i ../chromium-skia-harmony.patch
|
||||
|
||||
# Fixes from Gentoo
|
||||
patch -Np1 -i ../chromium-cors-string-r0.patch
|
||||
patch -Np1 -i ../chromium-ffmpeg-r1.patch
|
||||
patch -Np1 -i ../chromium-libjpeg-r0.patch
|
||||
patch -Np1 -i ../chromium-libwebp-shim-r0.patch
|
||||
patch -Np1 -i ../chromium-widevine-r2.patch
|
||||
|
||||
# Remove compiler flags not supported by our system clang
|
||||
|
@ -166,6 +171,7 @@ build() {
|
|||
'host_toolchain="//build/toolchain/linux/unbundle:default"'
|
||||
'clang_use_chrome_plugins=false'
|
||||
'is_official_build=true' # implies is_cfi=true on x86_64
|
||||
'use_cfi_icall=false' # https://crbug.com/866290
|
||||
'is_cfi=false'
|
||||
'is_debug=false'
|
||||
'treat_warnings_as_errors=false'
|
||||
|
|
51
extra/chromium/chromium-cors-string-r0.patch
Normal file
51
extra/chromium/chromium-cors-string-r0.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
From 01d891fa0790950549c7bedb34edf869827a372e Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jose.dapena@lge.com>
|
||||
Date: Thu, 31 May 2018 17:03:37 +0000
|
||||
Subject: [PATCH] CORS legacy: add missing string include
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The cors_legacy.h file includes declarations using std::string, but
|
||||
it is not declared due to missing #include <string>.
|
||||
|
||||
Also drop unneeded declarations in .cpp file.
|
||||
|
||||
Change-Id: I00df799f84a6c3530c2f12f1e52d24c7d9bd6bfd
|
||||
Reviewed-on: https://chromium-review.googlesource.com/1080707
|
||||
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#563282}
|
||||
---
|
||||
services/network/public/cpp/cors/cors_legacy.cc | 2 --
|
||||
services/network/public/cpp/cors/cors_legacy.h | 1 +
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/network/public/cpp/cors/cors_legacy.cc b/services/network/public/cpp/cors/cors_legacy.cc
|
||||
index 8f32ac3be64e..f01af63619b5 100644
|
||||
--- a/services/network/public/cpp/cors/cors_legacy.cc
|
||||
+++ b/services/network/public/cpp/cors/cors_legacy.cc
|
||||
@@ -5,8 +5,6 @@
|
||||
#include "services/network/public/cpp/cors/cors_legacy.h"
|
||||
|
||||
#include <algorithm>
|
||||
-#include <string>
|
||||
-#include <vector>
|
||||
|
||||
#include "url/gurl.h"
|
||||
#include "url/url_util.h"
|
||||
diff --git a/services/network/public/cpp/cors/cors_legacy.h b/services/network/public/cpp/cors/cors_legacy.h
|
||||
index d2cdf026ca3a..dc9295a92c47 100644
|
||||
--- a/services/network/public/cpp/cors/cors_legacy.h
|
||||
+++ b/services/network/public/cpp/cors/cors_legacy.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
|
||||
#define SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
|
||||
|
||||
+#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/component_export.h"
|
||||
--
|
||||
2.17.1
|
||||
|
62
extra/chromium/chromium-libjpeg-r0.patch
Normal file
62
extra/chromium/chromium-libjpeg-r0.patch
Normal file
|
@ -0,0 +1,62 @@
|
|||
From c6b0194f7a4d9f494b2d51f46d2c332e2e5f4050 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Bratell <bratell@opera.com>
|
||||
Date: Mon, 28 May 2018 13:13:01 +0000
|
||||
Subject: [PATCH] Use the same libjpeg in all of blink/platform
|
||||
|
||||
The normal libjpeg renames some symbols with macros so if its
|
||||
headers are included together with libjpeg-turbo's headers
|
||||
in the same translation unit, there will be an inconsistent
|
||||
renaming of libjpeg symbols. This happened in some extreme
|
||||
jumbo configuration and resulted in confising linker errors.
|
||||
|
||||
This patch changes an include so that jpeglib.h becomes included
|
||||
the same way everywhere.
|
||||
|
||||
Change-Id: I7f122d0919d58371bb40dc0097a766b857b9815e
|
||||
Reviewed-on: https://chromium-review.googlesource.com/1073423
|
||||
Reviewed-by: Kentaro Hara <haraken@chromium.org>
|
||||
Commit-Queue: Daniel Bratell <bratell@opera.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#562243}
|
||||
---
|
||||
.../renderer/platform/image-encoders/image_encoder.cc | 11 +++++++++++
|
||||
.../renderer/platform/image-encoders/image_encoder.h | 2 --
|
||||
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
|
||||
index 0c7f14c7c0e4..4c450f5d6783 100644
|
||||
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
|
||||
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
|
||||
@@ -4,6 +4,17 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/image-encoders/image_encoder.h"
|
||||
|
||||
+#include "build/build_config.h"
|
||||
+
|
||||
+#if defined(OS_WIN)
|
||||
+#include <basetsd.h> // Included before jpeglib.h because of INT32 clash
|
||||
+#endif // OS_WIN
|
||||
+#include <stdio.h> // Needed by jpeglib.h
|
||||
+
|
||||
+#include "jpeglib.h" // for JPEG_MAX_DIMENSION
|
||||
+
|
||||
+#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
|
||||
+
|
||||
namespace blink {
|
||||
|
||||
bool ImageEncoder::Encode(Vector<unsigned char>* dst,
|
||||
diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.h b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
|
||||
index 0d1460f34827..40306097d507 100644
|
||||
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.h
|
||||
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/platform_export.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
||||
-#include "third_party/libjpeg/jpeglib.h" // for JPEG_MAX_DIMENSION
|
||||
-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
|
||||
#include "third_party/skia/include/core/SkStream.h"
|
||||
#include "third_party/skia/include/encode/SkJpegEncoder.h"
|
||||
#include "third_party/skia/include/encode/SkPngEncoder.h"
|
||||
--
|
||||
2.17.1
|
||||
|
43
extra/chromium/chromium-libwebp-shim-r0.patch
Normal file
43
extra/chromium/chromium-libwebp-shim-r0.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
diff --git a/build/linux/unbundle/libwebp.gn b/build/linux/unbundle/libwebp.gn
|
||||
index ab92adecf400..12574d87be58 100644
|
||||
--- a/build/linux/unbundle/libwebp.gn
|
||||
+++ b/build/linux/unbundle/libwebp.gn
|
||||
@@ -2,12 +2,34 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libwebp") {
|
||||
+ packages = [
|
||||
+ "libwebp",
|
||||
+ "libwebpdemux",
|
||||
+ "libwebpmux",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libwebp_shim") {
|
||||
+ root_path = "src"
|
||||
+ headers = [
|
||||
+ "webp/decode.h",
|
||||
+ "webp/demux.h",
|
||||
+ "webp/encode.h",
|
||||
+ "webp/mux.h",
|
||||
+ "webp/mux_types.h",
|
||||
+ "webp/types.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
source_set("libwebp_webp") {
|
||||
- libs = [
|
||||
- "webp",
|
||||
- "webpdemux",
|
||||
- "webpmux",
|
||||
+ deps = [
|
||||
+ ":libwebp_shim",
|
||||
]
|
||||
+ public_configs = [ ":system_libwebp" ]
|
||||
}
|
||||
|
||||
group("libwebp") {
|
|
@ -1,260 +0,0 @@
|
|||
From f9535bd6d61d7e0b2cb452e6976a914d4ee62a2b Mon Sep 17 00:00:00 2001
|
||||
From: Dale Curtis <dalecurtis@chromium.org>
|
||||
Date: Thu, 17 May 2018 23:44:41 +0000
|
||||
Subject: [PATCH] Remove dependency on ffmpeg internals for start time
|
||||
calculations.
|
||||
|
||||
Some theora clips still have issues, but using first_dts where
|
||||
we know it's the same as the first pts resolves the lingering
|
||||
issues. It also looks like we don't need to use pts_buffer now.
|
||||
|
||||
This does the following small fixes:
|
||||
- MEDIA_LOG(DEBUG) -> MEDIA_LOG(ERROR) for negative ts error.
|
||||
- Enables previous disabled test in more limited state.
|
||||
- Adds kNoFFmpegTimestamp so static_cast<int64_t>(AV_NOPTS_VALUE)
|
||||
is no longer necessary everywhere. A followup patch set will use
|
||||
this is more places.
|
||||
- Removes pts_buffer and packet_buffer inspection.
|
||||
|
||||
BUG=731766
|
||||
TEST=all tests pass.
|
||||
|
||||
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
|
||||
Change-Id: I5aadf67a3b5ea2d2a8dd19bbddd7b107208094c5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/1064538
|
||||
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
|
||||
Reviewed-by: Frank Liberato <liberato@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#559737}
|
||||
---
|
||||
media/ffmpeg/ffmpeg_common.h | 5 +-
|
||||
media/filters/ffmpeg_demuxer.cc | 88 +++++++-----------------
|
||||
media/filters/ffmpeg_demuxer_unittest.cc | 24 +++----
|
||||
3 files changed, 37 insertions(+), 80 deletions(-)
|
||||
|
||||
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
|
||||
index ec33068fb84f..f641d6bcf92e 100644
|
||||
--- a/media/ffmpeg/ffmpeg_common.h
|
||||
+++ b/media/ffmpeg/ffmpeg_common.h
|
||||
@@ -28,9 +28,6 @@ extern "C" {
|
||||
MSVC_PUSH_DISABLE_WARNING(4244);
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
-#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
|
||||
-#include <libavformat/internal.h>
|
||||
-#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
|
||||
#include <libavformat/avio.h>
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
@@ -42,6 +39,8 @@ MSVC_POP_WARNING();
|
||||
|
||||
namespace media {
|
||||
|
||||
+constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE);
|
||||
+
|
||||
class AudioDecoderConfig;
|
||||
class EncryptionScheme;
|
||||
class VideoDecoderConfig;
|
||||
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
||||
index 49ca01c4dc0b..7402ce16ab5e 100644
|
||||
--- a/media/filters/ffmpeg_demuxer.cc
|
||||
+++ b/media/filters/ffmpeg_demuxer.cc
|
||||
@@ -85,29 +85,26 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
|
||||
frames * base::Time::kMicrosecondsPerSecond / sample_rate);
|
||||
}
|
||||
|
||||
-static base::TimeDelta ExtractStartTime(AVStream* stream,
|
||||
- base::TimeDelta start_time_estimate) {
|
||||
- DCHECK(start_time_estimate != kNoTimestamp);
|
||||
- if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- return start_time_estimate == kInfiniteDuration ? base::TimeDelta()
|
||||
- : start_time_estimate;
|
||||
+static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
+ // The default start time is zero.
|
||||
+ base::TimeDelta start_time;
|
||||
+
|
||||
+ // First try to use the |start_time| value as is.
|
||||
+ if (stream->start_time != kNoFFmpegTimestamp)
|
||||
+ start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
|
||||
+
|
||||
+ // 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 &&
|
||||
+ 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);
|
||||
+ if (first_pts < start_time)
|
||||
+ start_time = first_pts;
|
||||
}
|
||||
|
||||
- // First try the lower of the estimate and the |start_time| value.
|
||||
- base::TimeDelta start_time =
|
||||
- std::min(ConvertFromTimeBase(stream->time_base, stream->start_time),
|
||||
- start_time_estimate);
|
||||
-
|
||||
- // Next see if the first buffered pts value is usable.
|
||||
- if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- const base::TimeDelta buffered_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]);
|
||||
- if (buffered_pts < start_time)
|
||||
- start_time = buffered_pts;
|
||||
- }
|
||||
-
|
||||
- // NOTE: Do not use AVStream->first_dts since |start_time| should be a
|
||||
- // presentation timestamp.
|
||||
return start_time;
|
||||
}
|
||||
|
||||
@@ -513,7 +510,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
buffer->set_duration(kNoTimestamp);
|
||||
}
|
||||
|
||||
- // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp.
|
||||
+ // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp.
|
||||
const base::TimeDelta stream_timestamp =
|
||||
ConvertStreamTimestamp(stream_->time_base, packet->pts);
|
||||
|
||||
@@ -556,8 +553,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
// code paths below; otherwise they should be treated as a parse error.
|
||||
if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) &&
|
||||
buffer->timestamp() < base::TimeDelta()) {
|
||||
- MEDIA_LOG(DEBUG, media_log_)
|
||||
- << "FFmpegDemuxer: unfixable negative timestamp";
|
||||
+ MEDIA_LOG(ERROR, media_log_)
|
||||
+ << "FFmpegDemuxer: unfixable negative timestamp.";
|
||||
demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE);
|
||||
return;
|
||||
}
|
||||
@@ -863,7 +860,7 @@ std::string FFmpegDemuxerStream::GetMetadata(const char* key) const {
|
||||
base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
|
||||
const AVRational& time_base,
|
||||
int64_t timestamp) {
|
||||
- if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE))
|
||||
+ if (timestamp == kNoFFmpegTimestamp)
|
||||
return kNoTimestamp;
|
||||
|
||||
return ConvertFromTimeBase(time_base, timestamp);
|
||||
@@ -1256,42 +1253,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
|
||||
AVFormatContext* format_context = glue_->format_context();
|
||||
streams_.resize(format_context->nb_streams);
|
||||
|
||||
- // Estimate the start time for each stream by looking through the packets
|
||||
- // buffered during avformat_find_stream_info(). These values will be
|
||||
- // considered later when determining the actual stream start time.
|
||||
- //
|
||||
- // These packets haven't been completely processed yet, so only look through
|
||||
- // these values if the AVFormatContext has a valid start time.
|
||||
- //
|
||||
- // If no estimate is found, the stream entry will be kInfiniteDuration.
|
||||
- std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
|
||||
- kInfiniteDuration);
|
||||
-#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
|
||||
- const AVFormatInternal* internal = format_context->internal;
|
||||
- if (internal && internal->packet_buffer &&
|
||||
- format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- struct AVPacketList* packet_buffer = internal->packet_buffer;
|
||||
- while (packet_buffer != internal->packet_buffer_end) {
|
||||
- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
|
||||
- start_time_estimates.size());
|
||||
- const AVStream* stream =
|
||||
- format_context->streams[packet_buffer->pkt.stream_index];
|
||||
- if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- const base::TimeDelta packet_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
|
||||
- // We ignore kNoTimestamp here since -int64_t::min() is possible; see
|
||||
- // https://crbug.com/700501. Technically this is a valid value, but in
|
||||
- // practice shouldn't occur, so just ignore it when estimating.
|
||||
- if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
|
||||
- packet_pts < start_time_estimates[stream->index]) {
|
||||
- start_time_estimates[stream->index] = packet_pts;
|
||||
- }
|
||||
- }
|
||||
- packet_buffer = packet_buffer->next;
|
||||
- }
|
||||
- }
|
||||
-#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
|
||||
-
|
||||
std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
|
||||
|
||||
DCHECK(track_id_to_demux_stream_map_.empty());
|
||||
@@ -1440,8 +1401,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
|
||||
|
||||
max_duration = std::max(max_duration, streams_[i]->duration());
|
||||
|
||||
- base::TimeDelta start_time =
|
||||
- ExtractStartTime(stream, start_time_estimates[i]);
|
||||
+ base::TimeDelta start_time = ExtractStartTime(stream);
|
||||
|
||||
// Note: This value is used for seeking, so we must take the true value and
|
||||
// not the one possibly clamped to zero below.
|
||||
@@ -1479,7 +1439,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
|
||||
if (text_enabled_)
|
||||
AddTextStreams();
|
||||
|
||||
- if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
+ if (format_context->duration != kNoFFmpegTimestamp) {
|
||||
// If there is a duration value in the container use that to find the
|
||||
// maximum between it and the duration from A/V streams.
|
||||
const AVRational av_time_base = {1, AV_TIME_BASE};
|
||||
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
|
||||
index 71dbed07b376..b09816a3ba3a 100644
|
||||
--- a/media/filters/ffmpeg_demuxer_unittest.cc
|
||||
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
|
||||
@@ -696,12 +696,9 @@ TEST_F(FFmpegDemuxerTest, Read_InvalidNegativeTimestamp) {
|
||||
ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
|
||||
}
|
||||
|
||||
-// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
|
||||
-// the order of demuxed packets in OGG containers. Re-enable and fix key frame
|
||||
-// expectations once we decide to either workaround it or attempt a fix
|
||||
-// upstream. See http://crbug.com/387996.
|
||||
-TEST_F(FFmpegDemuxerTest,
|
||||
- DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
|
||||
+// Android has no Theora support, so these tests doesn't work.
|
||||
+#if !defined(OS_ANDROID)
|
||||
+TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
|
||||
// Many ogg files have negative starting timestamps, so ensure demuxing and
|
||||
// seeking work correctly with a negative start time.
|
||||
CreateDemuxer("bear.ogv");
|
||||
@@ -711,8 +708,12 @@ TEST_F(FFmpegDemuxerTest,
|
||||
DemuxerStream* video = GetStream(DemuxerStream::VIDEO);
|
||||
DemuxerStream* audio = GetStream(DemuxerStream::AUDIO);
|
||||
|
||||
- // Run the test twice with a seek in between.
|
||||
- for (int i = 0; i < 2; ++i) {
|
||||
+ // Run the test once (should be twice..., see note) with a seek in between.
|
||||
+ //
|
||||
+ // TODO(dalecurtis): We only run the test once since FFmpeg does not currently
|
||||
+ // guarantee the order of demuxed packets in OGG containers. See
|
||||
+ // http://crbug.com/387996.
|
||||
+ for (int i = 0; i < 1; ++i) {
|
||||
audio->Read(
|
||||
NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true));
|
||||
base::RunLoop().Run();
|
||||
@@ -731,10 +732,10 @@ TEST_F(FFmpegDemuxerTest,
|
||||
video->Read(NewReadCB(FROM_HERE, 5751, 0, true));
|
||||
base::RunLoop().Run();
|
||||
|
||||
- video->Read(NewReadCB(FROM_HERE, 846, 33367, true));
|
||||
+ video->Read(NewReadCB(FROM_HERE, 846, 33367, false));
|
||||
base::RunLoop().Run();
|
||||
|
||||
- video->Read(NewReadCB(FROM_HERE, 1255, 66733, true));
|
||||
+ video->Read(NewReadCB(FROM_HERE, 1255, 66733, false));
|
||||
base::RunLoop().Run();
|
||||
|
||||
// Seek back to the beginning and repeat the test.
|
||||
@@ -747,9 +748,6 @@ TEST_F(FFmpegDemuxerTest,
|
||||
// Same test above, but using sync2.ogv which has video stream muxed before the
|
||||
// audio stream, so seeking based only on start time will fail since ffmpeg is
|
||||
// essentially just seeking based on file position.
|
||||
-//
|
||||
-// Android has no Theora support, so this test doesn't work.
|
||||
-#if !defined(OS_ANDROID)
|
||||
TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) {
|
||||
// Many ogg files have negative starting timestamps, so ensure demuxing and
|
||||
// seeking work correctly with a negative start time.
|
||||
--
|
||||
2.17.0
|
||||
|
Loading…
Reference in a new issue