input/ffmpeg: use FfmpegInit() instead of av_register_all()

Make sure that the log callback is installed.
This commit is contained in:
Max Kellermann 2014-12-21 20:56:42 +01:00
parent 90b91ead72
commit fefe2df3ee
1 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,7 @@
#include "config.h" #include "config.h"
#include "FfmpegInputPlugin.hxx" #include "FfmpegInputPlugin.hxx"
#include "lib/ffmpeg/Init.hxx"
#include "lib/ffmpeg/Domain.hxx" #include "lib/ffmpeg/Domain.hxx"
#include "lib/ffmpeg/Error.hxx" #include "lib/ffmpeg/Error.hxx"
#include "../InputStream.hxx" #include "../InputStream.hxx"
@ -31,7 +32,6 @@
extern "C" { extern "C" {
#include <libavformat/avio.h> #include <libavformat/avio.h>
#include <libavformat/avformat.h>
} }
struct FfmpegInputStream final : public InputStream { struct FfmpegInputStream final : public InputStream {
@ -75,7 +75,7 @@ static InputPlugin::InitResult
input_ffmpeg_init(gcc_unused const config_param &param, input_ffmpeg_init(gcc_unused const config_param &param,
Error &error) Error &error)
{ {
av_register_all(); FfmpegInit();
/* disable this plugin if there's no registered protocol */ /* disable this plugin if there's no registered protocol */
if (!input_ffmpeg_supported()) { if (!input_ffmpeg_supported()) {