update ffmpeg patches

This commit is contained in:
Tigro 2016-03-08 19:53:41 +03:00
parent 459a709ae6
commit ce0fa5ef70
3 changed files with 24 additions and 59 deletions

View file

@ -55,10 +55,8 @@ Patch503: enable_vaapi_on_linux.diff
# fix build with icu other than 54
Patch504: chromium-system-icu-r0.patch
# (cjw) Don't disable deprecated APIs in ffmpeg header files, some of which change the ABI.
# From debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763632
Patch505: fix_for_system_ffmpeg_ABI.patch
# (cjw) Do not use ffmpeg internal header(s)
Patch506: chromium-43-no-ffmpeg-internal.patch
# From Gentoo: http://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-system-ffmpeg-r2.patch
Patch505: chromium-system-ffmpeg-r2.patch
# fix https://bugs.chromium.org/p/chromium/issues/detail?id=585513
# vaInitialize failed VA error: unknown libva error
Patch507: issue1688073002_40001.diff
@ -304,7 +302,6 @@ find third_party/icu -type f \! -regex '.*\.\(gyp\|gypi\|isolate\)' -delete
%if 0%{?ffmpeg}
%patch505 -p1
%patch506 -p1
%endif
#patch600 -p1

View file

@ -1,7 +1,17 @@
diff -up chromium-43.0.2357.2/media/ffmpeg/ffmpeg_common.h.no-ffmpeg-internal chromium-43.0.2357.2/media/ffmpeg/ffmpeg_common.h
--- chromium-43.0.2357.2/media/ffmpeg/ffmpeg_common.h.no-ffmpeg-internal 2015-04-06 22:56:30.611343967 +0200
+++ chromium-43.0.2357.2/media/ffmpeg/ffmpeg_common.h 2015-04-06 22:57:29.507220212 +0200
@@ -25,7 +25,6 @@ extern "C" {
--- a/media/ffmpeg/ffmpeg_common.h 2015-11-27 12:01:56.155462264 +0000
+++ b/media/ffmpeg/ffmpeg_common.h 2015-11-27 12:03:03.348846300 +0000
@@ -19,10 +19,6 @@
// Include FFmpeg header files.
extern "C" {
-// Disable deprecated features which result in spammy compile warnings. This
-// list of defines must mirror those in the 'defines' section of BUILD.gn file &
-// ffmpeg.gyp file or the headers below will generate different structures!
-#define FF_API_CONVERGENCE_DURATION 0
// Upstream libavcodec/utils.c still uses the deprecated
// av_dup_packet(), causing deprecation warnings.
// The normal fix for such things is to disable the feature as below,
@@ -36,7 +32,6 @@
MSVC_PUSH_DISABLE_WARNING(4244);
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
@ -9,23 +19,24 @@ diff -up chromium-43.0.2357.2/media/ffmpeg/ffmpeg_common.h.no-ffmpeg-internal ch
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
#include <libavutil/imgutils.h>
diff -up chromium-43.0.2357.2/media/filters/ffmpeg_demuxer.cc.no-ffmpeg-internal chromium-43.0.2357.2/media/filters/ffmpeg_demuxer.cc
--- chromium-43.0.2357.2/media/filters/ffmpeg_demuxer.cc.no-ffmpeg-internal 2015-04-04 11:58:19.000000000 +0200
+++ chromium-43.0.2357.2/media/filters/ffmpeg_demuxer.cc 2015-04-06 23:03:42.158107294 +0200
@@ -838,25 +838,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 155e980..7ba327a 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1034,24 +1034,6 @@
// If no estimate is found, the stream entry will be kInfiniteDuration().
std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
kInfiniteDuration());
- const AVFormatInternal* internal = format_context->internal;
- if (internal && internal->packet_buffer &&
- format_context->start_time != static_cast<int64>(AV_NOPTS_VALUE)) {
- 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>(AV_NOPTS_VALUE)) {
- 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);
- if (packet_pts < start_time_estimates[stream->index])
@ -34,7 +45,6 @@ diff -up chromium-43.0.2357.2/media/filters/ffmpeg_demuxer.cc.no-ffmpeg-internal
- packet_buffer = packet_buffer->next;
- }
- }
-
AVStream* audio_stream = NULL;
AudioDecoderConfig audio_config;
AVStream* video_stream = NULL;

View file

@ -1,42 +0,0 @@
diff -up chromium-48.0.2564.8/media/ffmpeg/ffmpeg_common.h.disable_ffmpeg_api_change chromium-48.0.2564.8/media/ffmpeg/ffmpeg_common.h
--- chromium-48.0.2564.8/media/ffmpeg/ffmpeg_common.h.disable_ffmpeg_api_change 2015-11-18 13:16:05.867971946 +0100
+++ chromium-48.0.2564.8/media/ffmpeg/ffmpeg_common.h 2015-11-18 13:19:20.130249467 +0100
@@ -19,18 +19,6 @@
// Include FFmpeg header files.
extern "C" {
-// Disable deprecated features which result in spammy compile warnings. This
-// list of defines must mirror those in the 'defines' section of BUILD.gn file &
-// ffmpeg.gyp file or the headers below will generate different structures!
-#define FF_API_CONVERGENCE_DURATION 0
-// Upstream libavcodec/utils.c still uses the deprecated
-// av_dup_packet(), causing deprecation warnings.
-// The normal fix for such things is to disable the feature as below,
-// but the upstream code does not yet compile with it disabled.
-// (In this case, the fix is replacing the call with a new function.)
-// In the meantime, we directly disable those warnings in the C file.
-//#define FF_API_AVPACKET_OLD_API 0
-
// Temporarily disable possible loss of data warning.
// TODO(scherkus): fix and upstream the compiler warnings.
MSVC_PUSH_DISABLE_WARNING(4244);
diff -up chromium-48.0.2564.8/third_party/ffmpeg/ffmpeg.gyp.disable_ffmpeg_api_change chromium-48.0.2564.8/third_party/ffmpeg/ffmpeg.gyp
--- chromium-48.0.2564.8/third_party/ffmpeg/ffmpeg.gyp.disable_ffmpeg_api_change 2015-11-18 13:16:05.869971908 +0100
+++ chromium-48.0.2564.8/third_party/ffmpeg/ffmpeg.gyp 2015-11-18 13:19:31.344034578 +0100
@@ -199,16 +199,6 @@
'_POSIX_C_SOURCE=200112',
'_XOPEN_SOURCE=600',
'PIC',
- # Disable deprecated features that generate spammy warnings.
- # BUILD.gn & media/ffmpeg/ffmpeg_common.h must be kept in sync.
- 'FF_API_CONVERGENCE_DURATION=0',
- # Upstream libavcodec/utils.c still uses the deprecated
- # av_dup_packet(), causing deprecation warnings.
- # The normal fix for such things is to disable the feature as below,
- # but the upstream code does not yet compile with it disabled.
- # (In this case, the fix is replacing the call with a new function.)
- # In the meantime, we directly disable those warnings in the C file.
- # 'FF_API_AVPACKET_OLD_API=0',
],
'variables': {
'clang_warning_flags': [