diff options
Diffstat (limited to 'libmpcodecs/ad_ffmpeg.c')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 6b7ca97885..6dd5dcf492 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -25,6 +25,7 @@ #include "options.h" #include "ad_internal.h" +#include "vd_ffmpeg.h" #include "libaf/reorder_ch.h" #include "mpbswap.h" @@ -44,7 +45,6 @@ LIBAD_EXTERN(ffmpeg) #include "libavcodec/avcodec.h" -extern int avcodec_initialized; static int preinit(sh_audio_t *sh) { @@ -99,11 +99,7 @@ static int init(sh_audio_t *sh_audio) AVCodec *lavc_codec; mp_msg(MSGT_DECAUDIO,MSGL_V,"FFmpeg's libavcodec audio codec\n"); - if(!avcodec_initialized){ - avcodec_init(); - avcodec_register_all(); - avcodec_initialized=1; - } + init_avcodec(); lavc_codec = avcodec_find_decoder_by_name(sh_audio->codec->dll); if(!lavc_codec){ |