[MPlayer-cvslog] r35339 - in trunk: codec-cfg.c codec-cfg.h etc/codecs.conf

upsuper subversion at mplayerhq.hu
Sat Nov 3 13:59:57 CET 2012


Author: upsuper
Date: Sat Nov  3 13:59:57 2012
New Revision: 35339

Log:
Add flag "dummy" for null and black decoder

Modified:
   trunk/codec-cfg.c
   trunk/codec-cfg.h
   trunk/etc/codecs.conf

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Fri Nov  2 06:42:48 2012	(r35338)
+++ trunk/codec-cfg.c	Sat Nov  3 13:59:57 2012	(r35339)
@@ -752,6 +752,9 @@ int parse_codec_cfg(const char *cfgfile)
             if (!strcmp(token[0], "align16"))
                 codec->flags |= CODECS_FLAG_ALIGN16;
             else
+            if (!strcmp(token[0], "dummy"))
+                codec->flags |= CODECS_FLAG_DUMMY;
+            else
                 goto err_out_parse_error;
         } else if (!strcmp(token[0], "status")) {
             if (get_token(1, 1) < 0)
@@ -870,8 +873,7 @@ codecs_t* find_codec(unsigned int fourcc
         for (/* NOTHING */; i--; c++) {
             if(start && c<=start) continue;
             for (j = 0; j < CODECS_MAX_FOURCC; j++) {
-                // FIXME: do NOT hardwire 'null' and 'black' here:
-                if (c->fourcc[j]==fourcc || !strcmp(c->drv,"null") || !strcmp(c->drv,"black")) {
+                if (c->fourcc[j]==fourcc || c->flags & CODECS_FLAG_DUMMY) {
                     if (fourccmap)
                         *fourccmap = c->fourccmap[j];
                     return c;

Modified: trunk/codec-cfg.h
==============================================================================
--- trunk/codec-cfg.h	Fri Nov  2 06:42:48 2012	(r35338)
+++ trunk/codec-cfg.h	Sat Nov  3 13:59:57 2012	(r35339)
@@ -26,6 +26,7 @@
 // Global flags:
 #define CODECS_FLAG_SEEKABLE    (1<<0)
 #define CODECS_FLAG_ALIGN16     (1<<1)
+#define CODECS_FLAG_DUMMY       (1<<2)
 
 // Outfmt flags:
 #define CODECS_FLAG_FLIP        (1<<0)

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Fri Nov  2 06:42:48 2012	(r35338)
+++ trunk/etc/codecs.conf	Sat Nov  3 13:59:57 2012	(r35339)
@@ -4218,6 +4218,7 @@ videocodec null
   status crashing
   comment "for unknown/unsupported codecs or testing"
   driver null
+  flags dummy
   out YV12
   out I420
   out YUY2
@@ -4230,6 +4231,7 @@ videocodec black
   status crashing
   comment "for unknown/unsupported codecs or testing"
   driver black
+  flags dummy
   out YV12
   out I420
   out YUY2


More information about the MPlayer-cvslog mailing list