diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-18 00:28:22 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-18 00:57:05 +0300 |
commit | a4f41308190b79d79a5ac7a50791332e5c1d5600 (patch) | |
tree | 5207b45480ff2317544e17118a58e321160f856c /sub/av_sub.c | |
parent | 4e2b15fc5e5f457f62605262a46962b5fd63ff99 (diff) | |
download | mpv-a4f41308190b79d79a5ac7a50791332e5c1d5600.tar.bz2 mpv-a4f41308190b79d79a5ac7a50791332e5c1d5600.tar.xz |
cleanup: do libav* initialization on startup
Do the global initialization of libavcodec and libavformat
(avcodec_register_all(), av_register_all()) immediately on program
startup and remove the initialization calls from various individual
modules that use libavcodec/libavformat functionality.
Diffstat (limited to 'sub/av_sub.c')
-rw-r--r-- | sub/av_sub.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sub/av_sub.c b/sub/av_sub.c index a68fbce083..88f84db104 100644 --- a/sub/av_sub.c +++ b/sub/av_sub.c @@ -62,8 +62,6 @@ int decode_avsub(struct sh_sub *sh, uint8_t *data, int size, pkt.convergence_duration = duration * 1000; if (!ctx) { AVCodec *sub_codec; - avcodec_init(); - avcodec_register_all(); ctx = avcodec_alloc_context(); sub_codec = avcodec_find_decoder(cid); if (!ctx || !sub_codec || avcodec_open(ctx, sub_codec) < 0) { |