]> git.pld-linux.org Git - packages/chromium-browser.git/blobdiff - system-ffmpeg.patch
- pl
[packages/chromium-browser.git] / system-ffmpeg.patch
index d9358f5cb9a974f00b429129c455b3dc8847f266..8d67ef3898dfe4e5225218be393559bc41436bfa 100644 (file)
@@ -1,65 +1,50 @@
-Index: tools/compile_test/compile_test.py
-diff --git a/tools/compile_test/compile_test.py b/tools/compile_test/compile_test.py
-index 79371a1fd05d2e03e098340527fc897faadad54c..bbda4abfe54f327aabede26f400bebd5e1376d82 100755
---- a/tools/compile_test/compile_test.py
-+++ b/tools/compile_test/compile_test.py
-@@ -30,7 +30,9 @@ def DoMain(argv):
-   if not options.code:
-     parser.error('Missing required --code switch.')
--  cxx = os.environ.get('CXX', 'g++')
-+  # The environment variable might expand to a string with spaces,
-+  # e.g. "ccache g++". Convert it to a list suitable for argv.
-+  cxx = os.environ.get('CXX', 'g++').split()
-   tmpdir = tempfile.mkdtemp()
-   try:
-@@ -41,7 +41,7 @@
-     o_path = os.path.join(tmpdir, 'test.o')
--    cxx_popen = subprocess.Popen([cxx, cxx_path, '-o', o_path, '-c'],
-+    cxx_popen = subprocess.Popen(cxx + [cxx_path, '-o', o_path, '-c'],
-                                  stdout=subprocess.PIPE,
-                                  stderr=subprocess.PIPE)
-     cxx_stdout, cxx_stderr = cxx_popen.communicate()
-diff --git a/media/filters/ffmpeg_glue.h b/media/filters/ffmpeg_glue.h
-index 17241b9..8a92312 100644
---- a/media/filters/ffmpeg_glue.h
-+++ b/media/filters/ffmpeg_glue.h
-@@ -28,9 +28,9 @@
- #include "base/basictypes.h"
- #include "base/memory/scoped_ptr.h"
- #include "media/base/media_export.h"
-+#include "media/ffmpeg/ffmpeg_common.h"
- struct AVFormatContext;
--struct AVIOContext;
- namespace media {
-diff --git a/media/media.gyp b/media/media.gyp
-index df217d2..fde3830 100644
---- a/media/media.gyp
-+++ b/media/media.gyp
-@@ -363,6 +363,9 @@
-           'dependencies': [
-             '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
-           ],
-+          'export_dependent_settings': [
-+            '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
-+          ],
-         }, {  # media_use_ffmpeg == 0
-           # Exclude the sources that depend on ffmpeg.
-           'sources!': [
---- a/media/ffmpeg/ffmpeg_common.cc.orig       2013-01-17 00:07:51.635057013 +0000
-+++ b/media/ffmpeg/ffmpeg_common.cc    2013-01-17 00:15:50.867406811 +0000
-@@ -10,6 +10,8 @@
- #include "media/base/video_frame.h"
- #include "media/base/video_util.h"
-+#undef SampleFormat
-+
- namespace media {
- // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
+--- 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>
+-#include <libavformat/internal.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/imgutils.h>
+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_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;
+-    }
+-  }
+   AVStream* audio_stream = NULL;
+   AudioDecoderConfig audio_config;
This page took 0.056955 seconds and 4 git commands to generate.