--- a/media/ffmpeg/ffmpeg_common.h.orig 2017-04-07 18:17:22.623538889 +0000 +++ b/media/ffmpeg/ffmpeg_common.h 2017-04-07 18:18:16.780656283 +0000 @@ -23,10 +23,12 @@ // Include FFmpeg header files. extern "C" { +#if !defined(USE_SYSTEM_FFMPEG) // Disable deprecated features which result in spammy compile warnings. This // list of defines must mirror those in the 'defines' section of FFmpeg's // BUILD.gn file or the headers below will generate different structures! #define FF_API_CONVERGENCE_DURATION 0 +#endif // !defined(USE_SYSTEM_FFMPEG) // 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, @@ -40,7 +42,9 @@ MSVC_PUSH_DISABLE_WARNING(4244); #include #include +#if !defined(USE_SYSTEM_FFMPEG) #include +#endif // !defined(USE_SYSTEM_FFMPEG) #include #include #include --- a/media/filters/ffmpeg_demuxer.cc.orig 2017-04-07 18:15:14.776901183 +0000 +++ b/media/filters/ffmpeg_demuxer.cc 2017-04-07 18:15:54.813727201 +0000 @@ -1223,6 +1223,7 @@ // If no estimate is found, the stream entry will be kInfiniteDuration. std::vector start_time_estimates(format_context->nb_streams, kInfiniteDuration); +#if !defined(USE_SYSTEM_FFMPEG) const AVFormatInternal* internal = format_context->internal; if (internal && internal->packet_buffer && format_context->start_time != static_cast(AV_NOPTS_VALUE)) { @@ -1246,6 +1247,7 @@ packet_buffer = packet_buffer->next; } } +#endif // !defined(USE_SYSTEM_FFMPEG) std::unique_ptr media_tracks(new MediaTracks());