diff options
Diffstat (limited to 'libvo/jpeg_enc.c')
-rw-r--r-- | libvo/jpeg_enc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c index 5356d4b26d..37b5010250 100644 --- a/libvo/jpeg_enc.c +++ b/libvo/jpeg_enc.c @@ -41,10 +41,9 @@ #include "libavcodec/mpegvideo.h" #include "libavcodec/mjpegenc.h" +#include "libmpcodecs/vd_ffmpeg.h" #include "jpeg_enc.h" -extern int avcodec_initialized; - /* Begin excessive code duplication ************************************/ /* Code coming from mpegvideo.c and mjpeg.c in ../libavcodec ***********/ @@ -320,15 +319,7 @@ jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize, j->cheap_upsample = cu; j->bw = b; - /* if libavcodec is used by the decoder then we must not - * initialize again, but if it is not initialized then we must - * initialize it here. */ - if (!avcodec_initialized) { - /* we need to initialize libavcodec */ - avcodec_init(); - avcodec_register_all(); - avcodec_initialized=1; - } + init_avcodec(); if (ff_mjpeg_encode_init(j->s) < 0) { av_free(j->s); |