diff codec-cfg.c @ 35245:6055467828a4

Add flag "dummy" for null and black decoder
author upsuper
date Sat, 03 Nov 2012 12:59:57 +0000
parents 303bf4bab982
children d206960484fe
line wrap: on
line diff
--- a/codec-cfg.c	Fri Nov 02 05:42:48 2012 +0000
+++ b/codec-cfg.c	Sat Nov 03 12:59:57 2012 +0000
@@ -752,6 +752,9 @@
             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 @@
         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;