[MPlayer-dev-eng] Disable encoders

Gianluigi Tiesi mplayer at netfarm.it
Mon Jan 3 11:16:57 CET 2005


I've splitted my old patch in two part, a small patch to mplayer's
configure and a two file patch to ffmpeg tree,
this disables encoders when using --disable-mencoder,
and fixes compilation of snow.c and h261.c in ffmpeg if ENCODERS
is not defined.
If the patch seams ok please forward the ffmpeg one to ffmpeg ml
if it's needed.
Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
--- main/configure.orig	2005-01-03 10:58:57.000000000 +0100
+++ main/configure	2005-01-03 10:59:02.000000000 +0100
@@ -7118,8 +7118,11 @@
 
 /* Use libavcodec's decoders */
 #define CONFIG_DECODERS 1
+
+#ifdef HAVE_MENCODER
 /* Use libavcodec's encoders */
 #define CONFIG_ENCODERS 1
+#endif
 
 #define CONFIG_MPEGAUDIO_HP 1
 
-------------- next part --------------
diff -Nur libavcodec.orig/h261.c libavcodec/h261.c
--- libavcodec.orig/h261.c	2004-11-27 19:10:05.000000000 +0100
+++ libavcodec/h261.c	2005-01-03 11:08:28.000000000 +0100
@@ -1013,6 +1013,7 @@
     return 0;
 }
 
+#ifdef CONFIG_ENCODERS
 AVCodec h261_encoder = {
     "h261",
     CODEC_TYPE_VIDEO,
@@ -1022,6 +1023,7 @@
     MPV_encode_picture,
     MPV_encode_end,
 };
+#endif
 
 AVCodec h261_decoder = {
     "h261",
diff -Nur libavcodec.orig/snow.c libavcodec/snow.c
--- libavcodec.orig/snow.c	2004-11-25 20:26:46.000000000 +0100
+++ libavcodec/snow.c	2005-01-03 11:08:59.000000000 +0100
@@ -2612,6 +2612,7 @@
     }
 }
 
+#ifdef CONFIG_ENCODERS
 static int encode_init(AVCodecContext *avctx)
 {
     SnowContext *s = avctx->priv_data;
@@ -2660,6 +2661,7 @@
     s->chroma_v_shift= 1;
     return 0;
 }
+#endif
 
 static int frame_start(SnowContext *s){
    AVFrame tmp;
@@ -3005,6 +3007,7 @@
     NULL
 };
 
+#ifdef CONFIG_ENCODERS
 AVCodec snow_encoder = {
     "snow",
     CODEC_TYPE_VIDEO,
@@ -3014,6 +3017,7 @@
     encode_frame,
     encode_end,
 };
+#endif
 
 
 #if 0


More information about the MPlayer-dev-eng mailing list