chromium-browser-stable/chromium-system-ffmpeg-r3.patch
2016-05-27 12:03:45 +03:00

71 lines
3.4 KiB
Diff

diff -urN chromium-51.0.2704.63.orig/build/linux/unbundle/ffmpeg.gyp chromium-51.0.2704.63/build/linux/unbundle/ffmpeg.gyp
--- chromium-51.0.2704.63.orig/build/linux/unbundle/ffmpeg.gyp 2016-05-26 14:22:22.928579777 +0300
+++ chromium-51.0.2704.63/build/linux/unbundle/ffmpeg.gyp 2016-05-26 14:24:33.459279812 +0300
@@ -41,6 +41,17 @@
'USE_SYSTEM_FFMPEG',
],
},
+ 'variables': {
+ 'headers_root_path': '.',
+ 'header_filenames': [
+ 'libavcodec/avcodec.h',
+ 'libavformat/avformat.h',
+ 'libavutil/imgutils.h',
+ ],
+ },
+ 'includes': [
+ '../../build/shim_headers.gypi',
+ ],
'link_settings': {
'ldflags': [
'<!@(pkg-config --libs-only-L --libs-only-other libavcodec libavformat libavutil)',
diff -urN chromium-51.0.2704.63.orig/media/ffmpeg/ffmpeg_common.h chromium-51.0.2704.63/media/ffmpeg/ffmpeg_common.h
--- chromium-51.0.2704.63.orig/media/ffmpeg/ffmpeg_common.h 2016-05-26 14:23:54.895186671 +0300
+++ chromium-51.0.2704.63/media/ffmpeg/ffmpeg_common.h 2016-05-26 14:24:33.447279472 +0300
@@ -22,10 +22,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,
@@ -39,7 +35,6 @@
MSVC_PUSH_DISABLE_WARNING(4244);
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
-#include <libavformat/internal.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
#include <libavutil/imgutils.h>
diff -urN chromium-51.0.2704.63.orig/media/filters/ffmpeg_demuxer.cc chromium-51.0.2704.63/media/filters/ffmpeg_demuxer.cc
--- chromium-51.0.2704.63.orig/media/filters/ffmpeg_demuxer.cc 2016-05-26 14:23:55.197195232 +0300
+++ chromium-51.0.2704.63/media/filters/ffmpeg_demuxer.cc 2016-05-26 14:24:33.452279614 +0300
@@ -1092,24 +1092,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_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);
- if (packet_pts < start_time_estimates[stream->index])
- start_time_estimates[stream->index] = packet_pts;
- }
- packet_buffer = packet_buffer->next;
- }
- }
scoped_ptr<MediaTracks> media_tracks(new MediaTracks());
AVStream* audio_stream = NULL;