# HG changeset patch # User upsuper # Date 1351947597 0 # Node ID 6055467828a4cce34ca8e8ca5e90ae0b052d4989 # Parent 222713e4d79f88e23d82dcd91870ff9f6f8d744e Add flag "dummy" for null and black decoder diff -r 222713e4d79f -r 6055467828a4 codec-cfg.c --- 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; diff -r 222713e4d79f -r 6055467828a4 codec-cfg.h --- a/codec-cfg.h Fri Nov 02 05:42:48 2012 +0000 +++ b/codec-cfg.h Sat Nov 03 12:59:57 2012 +0000 @@ -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) diff -r 222713e4d79f -r 6055467828a4 etc/codecs.conf --- a/etc/codecs.conf Fri Nov 02 05:42:48 2012 +0000 +++ b/etc/codecs.conf Sat Nov 03 12:59:57 2012 +0000 @@ -4218,6 +4218,7 @@ status crashing comment "for unknown/unsupported codecs or testing" driver null + flags dummy out YV12 out I420 out YUY2 @@ -4230,6 +4231,7 @@ status crashing comment "for unknown/unsupported codecs or testing" driver black + flags dummy out YV12 out I420 out YUY2