diff options
author | rik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 13:46:34 +0000 |
---|---|---|
committer | rik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 13:46:34 +0000 |
commit | 05dcedd786ec01d965bcc9aa27bf750c0a6d79db (patch) | |
tree | 2f0e578bf5ee1e5aed9d24112f933667d25f1597 /libvo | |
parent | f7573d2c0977f65a97d6e09cb4cf75721511dcc5 (diff) |
use avcodec_inited instead of av_fdct to see if avcodec was initialized by another part of mplayer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5392 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/jpeg_enc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c index 132a030081..a3952a5faf 100644 --- a/libvo/jpeg_enc.c +++ b/libvo/jpeg_enc.c @@ -41,6 +41,8 @@ #include "jpeg_enc.h" +extern int avcodec_inited; + /* zr_mjpeg_encode_mb needs access to these tables for the black & white * option */ typedef struct MJpegContext { @@ -297,15 +299,12 @@ jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize, /* 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. There must be a better way to find out - * if it is initialized */ - if (av_fdct != jpeg_fdct_ifast -#ifdef HAVE_MMX - && av_fdct != fdct_mmx -#endif - ) { + * initialize it here. */ + if (!avcodec_inited) { /* we need to initialize libavcodec */ avcodec_init(); + avcodec_register_all(); + avcodec_inited=1; } if (mjpeg_init(j->s) < 0) { |