H264: Thread-safe InitializeFFmpeg. Flag to control if InitializeFFmpeg should be called.

New flag: rtc_initialize_ffmpeg, default value = !build_with_chromium.

In WebRTC standalone we initialize FFmpeg by default, in Chromium we don't by default.
Chromium is an external project that also use FFmpeg. If both projects do FFmpeg initialization code things will break. The flag makes it possible for other external projects than chromium to decide whether or not WebRTC should initialize FFmpeg.

BUG=chromium:500605, chromium:468365, webrtc:5427

Review URL: https://codereview.webrtc.org/1639273002

Cr-Commit-Position: refs/heads/master@{#11456}
This commit is contained in:
hbos
2016-02-02 02:26:05 -08:00
committed by Commit bot
parent 799379e8c2
commit c5a39c2591
5 changed files with 43 additions and 12 deletions

View File

@ -140,6 +140,9 @@ source_set("webrtc_h264") {
if (rtc_use_h264) {
defines += [ "WEBRTC_THIRD_PARTY_H264" ]
if (rtc_initialize_ffmpeg) {
defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
}
sources += [
"codecs/h264/h264_decoder_impl.cc",
"codecs/h264/h264_decoder_impl.h",