chromium-58.0.3029.81-system_ffmpeg-1.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
  2. Date: 2017-03-18
  3. Initial Package Version: 57.0.2987.110
  4. Upstream Status: Not submitted
  5. Origin: Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-system-ffmpeg-r4.patch
  6. Description: Allows building with system provided ffmpeg.
  7. --- a/media/ffmpeg/ffmpeg_common.h.orig 2016-09-09 13:16:07.757294768 +0000
  8. +++ b/media/ffmpeg/ffmpeg_common.h 2016-09-09 13:16:41.705989273 +0000
  9. @@ -22,10 +22,6 @@
  10. // Include FFmpeg header files.
  11. extern "C" {
  12. -// Disable deprecated features which result in spammy compile warnings. This
  13. -// list of defines must mirror those in the 'defines' section of FFmpeg's
  14. -// BUILD.gn file or the headers below will generate different structures!
  15. -#define FF_API_CONVERGENCE_DURATION 0
  16. // Upstream libavcodec/utils.c still uses the deprecated
  17. // av_dup_packet(), causing deprecation warnings.
  18. // The normal fix for such things is to disable the feature as below,
  19. @@ -35,7 +35,6 @@
  20. MSVC_PUSH_DISABLE_WARNING(4244);
  21. #include <libavcodec/avcodec.h>
  22. #include <libavformat/avformat.h>
  23. -#include <libavformat/internal.h>
  24. #include <libavformat/avio.h>
  25. #include <libavutil/avutil.h>
  26. #include <libavutil/imgutils.h>
  27. --- a/media/filters/ffmpeg_demuxer.cc.orig 2016-09-09 14:21:40.185828912 +0000
  28. +++ b/media/filters/ffmpeg_demuxer.cc 2016-09-09 14:21:52.894089352 +0000
  29. @@ -1185,24 +1185,6 @@
  30. // If no estimate is found, the stream entry will be kInfiniteDuration.
  31. std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
  32. kInfiniteDuration);
  33. - const AVFormatInternal* internal = format_context->internal;
  34. - if (internal && internal->packet_buffer &&
  35. - format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
  36. - struct AVPacketList* packet_buffer = internal->packet_buffer;
  37. - while (packet_buffer != internal->packet_buffer_end) {
  38. - DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
  39. - start_time_estimates.size());
  40. - const AVStream* stream =
  41. - format_context->streams[packet_buffer->pkt.stream_index];
  42. - if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
  43. - const base::TimeDelta packet_pts =
  44. - ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
  45. - if (packet_pts < start_time_estimates[stream->index])
  46. - start_time_estimates[stream->index] = packet_pts;
  47. - }
  48. - packet_buffer = packet_buffer->next;
  49. - }
  50. - }
  51. std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());