Don't call deprecated FFmpeg API.
This removes call of av_register_all(), which is deprecated, and related code. Bug: webrtc:9352 Change-Id: Ib7de5931c900eaf1023ecf3046f560feaaeec8ef Reviewed-on: https://webrtc-review.googlesource.com/85347 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23743}
This commit is contained in:
committed by
Commit Bot
parent
df3bcdbe88
commit
fe288eb687
@ -45,21 +45,6 @@ enum H264DecoderImplEvent {
|
||||
kH264DecoderEventMax = 16,
|
||||
};
|
||||
|
||||
#if defined(WEBRTC_INITIALIZE_FFMPEG)
|
||||
|
||||
rtc::CriticalSection ffmpeg_init_lock;
|
||||
bool ffmpeg_initialized = false;
|
||||
|
||||
void InitializeFFmpeg() {
|
||||
rtc::CritScope cs(&ffmpeg_init_lock);
|
||||
if (!ffmpeg_initialized) {
|
||||
av_register_all();
|
||||
ffmpeg_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(WEBRTC_INITIALIZE_FFMPEG)
|
||||
|
||||
} // namespace
|
||||
|
||||
int H264DecoderImpl::AVGetBuffer2(
|
||||
@ -171,18 +156,6 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
|
||||
// FFmpeg must have been initialized (with |av_register_all|) before we
|
||||
// proceed. |InitializeFFmpeg| does this, which makes sense for WebRTC
|
||||
// standalone. In other cases, such as Chromium, FFmpeg is initialized
|
||||
// externally and calling |InitializeFFmpeg| would be thread-unsafe and result
|
||||
// in FFmpeg being initialized twice, which could break other FFmpeg usage.
|
||||
// See the |rtc_initialize_ffmpeg| flag.
|
||||
#if defined(WEBRTC_INITIALIZE_FFMPEG)
|
||||
// Make sure FFmpeg has been initialized. Subsequent |InitializeFFmpeg| calls
|
||||
// do nothing.
|
||||
InitializeFFmpeg();
|
||||
#endif
|
||||
|
||||
// Release necessary in case of re-initializing.
|
||||
int32_t ret = Release();
|
||||
if (ret != WEBRTC_VIDEO_CODEC_OK) {
|
||||
|
||||
Reference in New Issue
Block a user