summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2001-09-01 17:10:00 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2001-09-01 17:10:00 +0000
commit6dfa50d76e2910c4eee1bc87bb6f5513e61bec30 (patch)
tree17107c667187074234aa33c050870956e4fbf95d
parentca2fe1fa5ecdb5cb59a60c205a3bd7ed1905bedf (diff)
downloadxine-lib-6dfa50d76e2910c4eee1bc87bb6f5513e61bec30.tar.gz
xine-lib-6dfa50d76e2910c4eee1bc87bb6f5513e61bec30.tar.bz2
DEBUG buils, profiler code crashes with NULL pointer access
CVS patchset: 539 CVS date: 2001/09/01 17:10:00
-rw-r--r--src/xine-engine/cpu_accel.h13
-rw-r--r--src/xine-engine/monitor.c13
-rw-r--r--src/xine-engine/xine.c3
3 files changed, 17 insertions, 12 deletions
diff --git a/src/xine-engine/cpu_accel.h b/src/xine-engine/cpu_accel.h
index 498b219fb..053c142f6 100644
--- a/src/xine-engine/cpu_accel.h
+++ b/src/xine-engine/cpu_accel.h
@@ -44,11 +44,14 @@ extern "C" {
#define MM_ACCEL_X86_MMX 0x80000000
#define MM_ACCEL_X86_3DNOW 0x40000000
#define MM_ACCEL_X86_MMXEXT 0x20000000
-#define MM_MMX 0x80000000
-#define MM_3DNOW 0x40000000
-#define MM_MMXEXT 0x20000000
-#define MM_SSE 0x00000000
-#define MM_SSE2 0x00000000
+#define MM_ACCEL_X86_SSE 0x10000000
+#define MM_ACCEL_X86_SSE2 0x08000000
+/* x86 compat defines */
+#define MM_MMX MM_ACCEL_X86_MMX
+#define MM_3DNOW MM_ACCEL_X86_3DNOW
+#define MM_MMXEXT MM_ACCEL_X86_MMXEXT
+#define MM_SSE MM_ACCEL_X86_SSE
+#define MM_SSE2 MM_ACCEL_X86_SSE2
uint32_t mm_accel (void) ;
/* uint32_t mm_support (void) ; */
diff --git a/src/xine-engine/monitor.c b/src/xine-engine/monitor.c
index abf026e07..7d9052dd7 100644
--- a/src/xine-engine/monitor.c
+++ b/src/xine-engine/monitor.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: monitor.c,v 1.2 2001/08/14 11:57:40 guenter Exp $
+ * $Id: monitor.c,v 1.3 2001/09/01 17:10:01 jkeil Exp $
*
* debug print and profiling functions - implementation
*
@@ -38,16 +38,16 @@
#ifdef DEBUG
-long long int profiler_times[MAX_ID+1] ;
-long long int profiler_start[MAX_ID+1] ;
-char * profiler_label[MAX_ID+1] ;
+long long int profiler_times[MAX_ID] ;
+long long int profiler_start[MAX_ID] ;
+char * profiler_label[MAX_ID] ;
void profiler_init () {
int i;
for (i=0; i<MAX_ID; i++) {
profiler_times[i] = 0;
profiler_start[i] = 0;
- profiler_label[i] = "??";
+ profiler_label[i] = NULL;
}
}
@@ -78,7 +78,8 @@ void profiler_print_results () {
printf ("\n\nPerformance analysis (usec):\n\n");
for (i=0; i<MAX_ID; i++) {
- printf ("%d:\t%s\t%12lld\n", i, profiler_label[i], profiler_times[i]);
+ if (profiler_label[i])
+ printf ("%d:\t%s\t%12lld\n", i, profiler_label[i], profiler_times[i]);
}
}
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index d57740654..a894aac63 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.54 2001/09/01 15:52:17 guenter Exp $
+ * $Id: xine.c,v 1.55 2001/09/01 17:10:01 jkeil Exp $
*
* top-level xine functions
*
@@ -399,6 +399,7 @@ xine_t *xine_init (vo_driver_t *vo,
/*
* set up profiler
*/
+ profiler_init();
profiler_set_label (0, "video decoder ");
profiler_set_label (1, "audio decoder/output ");
profiler_set_label (2, "video output ");