[Mplayer-cvslog] CVS: main codec-cfg.c,1.77,1.78 codec-cfg.h,1.50,1.51

Arpi of Ize arpi at mplayer.dev.hu
Mon Mar 25 04:03:00 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv8361

Modified Files:
	codec-cfg.c codec-cfg.h 
Log Message:
tagging selected codec to avoid trying the same codec several times

Index: codec-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- codec-cfg.c	23 Mar 2002 18:59:36 -0000	1.77
+++ codec-cfg.c	25 Mar 2002 03:02:57 -0000	1.78
@@ -702,12 +702,28 @@
 				if (c->fourcc[j]==fourcc || c->driver==0) {
 					if (fourccmap)
 						*fourccmap = c->fourccmap[j];
+					c->flags|=CODECS_FLAG_SELECTED;
 					return c;
 				}
 			}
 		}
 	}
 	return NULL;
+}
+
+void codecs_reset_selection(int audioflag){
+	int i;
+	codecs_t *c;
+	if (audioflag) {
+		i = nr_acodecs;
+		c = audio_codecs;
+	} else {
+		i = nr_vcodecs;
+		c = video_codecs;
+	}
+	if(i)
+	for (/* NOTHING */; i--; c++)
+		c->flags&=(~CODECS_FLAG_SELECTED);
 }
 
 void list_codecs(int audioflag){

Index: codec-cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- codec-cfg.h	22 Mar 2002 22:12:09 -0000	1.50
+++ codec-cfg.h	25 Mar 2002 03:02:57 -0000	1.51
@@ -7,6 +7,7 @@
 
 // Global flags:
 #define CODECS_FLAG_SEEKABLE	(1<<0)
+#define CODECS_FLAG_SELECTED	(1<<15)  /* for internal use */
 
 // Outfmt flags:
 #define CODECS_FLAG_FLIP	(1<<0)




More information about the MPlayer-cvslog mailing list