[MPlayer-cvslog] r31472 - in trunk: codec-cfg.c codec-cfg.h

reimar subversion at mplayerhq.hu
Sat Jun 19 20:31:36 CEST 2010


Author: reimar
Date: Sat Jun 19 20:31:35 2010
New Revision: 31472

Log:
Auto-update CODEC_CFG_MIN value to release value in etc/codecs.conf.
Allowing them to differ causes more issues than it is worth.

Modified:
   trunk/codec-cfg.c
   trunk/codec-cfg.h

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Fri Jun 18 19:28:17 2010	(r31471)
+++ trunk/codec-cfg.c	Sat Jun 19 20:31:35 2010	(r31472)
@@ -59,7 +59,9 @@
 #include "libmpcodecs/img_format.h"
 #include "codec-cfg.h"
 
-#ifndef CODECS2HTML
+#ifdef CODECS2HTML
+#define CODEC_CFG_MIN 20100000
+#else
 #include "codecs.conf.h"
 #endif
 
@@ -75,6 +77,7 @@
 #define TYPE_VIDEO      0
 #define TYPE_AUDIO      1
 
+static int codecs_conf_release;
 char * codecs_file = NULL;
 
 static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
@@ -578,6 +581,7 @@ int parse_codec_cfg(const char *cfgfile)
         tmp = atoi(token[0]);
         if (tmp < CODEC_CFG_MIN)
             goto err_out_release_num;
+        codecs_conf_release = tmp;
         while ((tmp = get_token(1, 1)) == RET_EOL)
             /* NOTHING */;
         if (tmp == RET_EOF)
@@ -1033,6 +1037,8 @@ int main(int argc, char* argv[])
      */
     if (!(nr_codecs = parse_codec_cfg((argc>1)?argv[1]:"etc/codecs.conf")))
         exit(1);
+    if (codecs_conf_release < CODEC_CFG_MIN)
+        exit(1);
 
     if (argc > 1) {
         int i, j;
@@ -1051,6 +1057,7 @@ int main(int argc, char* argv[])
         printf("/* GENERATED FROM %s, DO NOT EDIT! */\n\n",argv[1]);
         printf("#include <stddef.h>\n",argv[1]);
         printf("#include \"codec-cfg.h\"\n\n",argv[1]);
+        printf("#define CODEC_CFG_MIN %i\n\n", codecs_conf_release);
 
         for (i=0; i<2; i++) {
             printf("const codecs_t %s[] = {\n", nm[i]);

Modified: trunk/codec-cfg.h
==============================================================================
--- trunk/codec-cfg.h	Fri Jun 18 19:28:17 2010	(r31471)
+++ trunk/codec-cfg.h	Sat Jun 19 20:31:35 2010	(r31472)
@@ -19,8 +19,6 @@
 #ifndef MPLAYER_CODEC_CFG_H
 #define MPLAYER_CODEC_CFG_H
 
-#define CODEC_CFG_MIN   20070407
-
 #define CODECS_MAX_FOURCC       92
 #define CODECS_MAX_OUTFMT       16
 #define CODECS_MAX_INFMT        16


More information about the MPlayer-cvslog mailing list