From 4eb3b624c843c0d31f1431bc2f7ed1b9966c6220 Mon Sep 17 00:00:00 2001 From: arpi_esp Date: Fri, 6 Apr 2001 23:56:42 +0000 Subject: outflags[] reading fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@300 b3059339-0415-0410-9bf9-f77b7e298cf2 --- codec-cfg.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) (limited to 'codec-cfg.c') diff --git a/codec-cfg.c b/codec-cfg.c index af067e585d..e1c6449b55 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -138,12 +138,24 @@ int add_to_format(char *s, unsigned int *format) return 1; } +/* short get_flags(char *s) { + static char *flagstr[] = { + "flip", + "noflip", + "yuvhack", + NULL + }; + int j; + + printf("flags='%s'\n",s); + if (!s) return 0; return 1; } +*/ int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, unsigned char *outflags) @@ -177,6 +189,13 @@ int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, IMGFMT_BGR|24, IMGFMT_BGR|32 }; + static char *flagstr[] = { + "flip", + "noflip", + "yuvhack", + NULL + }; + int i, j; unsigned char flags; @@ -187,20 +206,30 @@ int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, return 0; } - flags = get_flags(sflags); + flags = 0; //get_flags(sflags); + if(sflags) do { + for (j = 0; flagstr[j] != NULL; j++) + if (!strncmp(sflags, flagstr[j], strlen(flagstr[j]))) + break; + if (flagstr[j] == NULL) return 0; // error! + flags|=(1< %08X (%.4s)\n",j,c->fourcc[j],&c->fourcc[j],c->fourccmap[j],&c->fourccmap[j]); } } + for(j=0;joutfmt[j]!=0xFFFFFFFF){ + printf("outfmt %02d: %08X (%.4s) flags: %d\n",j,c->outfmt[j],&c->outfmt[j],c->outflags[j]); + } + } } return 0; -- cgit v1.2.3