[Mplayer-cvslog] CVS: main/libvo jpeg_enc.c,1.3,1.4

Rik Snel CVS rik at mplayer.dev.hu
Fri Mar 29 14:46:44 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv16848

Modified Files:
	jpeg_enc.c 
Log Message:
use avcodec_inited instead of av_fdct to see if avcodec was initialized by another part of mplayer

Index: jpeg_enc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/jpeg_enc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- jpeg_enc.c	12 Feb 2002 23:30:07 -0000	1.3
+++ jpeg_enc.c	29 Mar 2002 13:46:34 -0000	1.4
@@ -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 @@
 
 	/* 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) {




More information about the MPlayer-cvslog mailing list