g_mutex_lock (thread->lock);
/* create the thread */
- pthread_create (&thread->thread_id, NULL, gst_thread_main_loop, thread);
+ if (pthread_create (&thread->thread_id, NULL, gst_thread_main_loop, thread) != 0) {
+ g_mutex_unlock (thread->lock);
+ THR_DEBUG ("could not create thread \"%s\"", GST_ELEMENT_NAME (element));
+ return GST_STATE_FAILURE;
+ }
/* wait for it to 'spin up' */
THR_DEBUG ("waiting for child thread spinup");
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include "gst_private.h"
#include "gstutils.h"
i = j = 0;
while (i < size) {
if (j == 0) {
- g_print ("\n%08x : ", i);
+ if (i != 0) {
+ guint k;
+
+ for (k = i - 16; k < i; k++) {
+ if (isprint (mem[k]))
+ g_print ("%c", mem[k]);
+ else
+ g_print (".");
+ }
+ g_print ("\n");
+ }
+ g_print ("%08x : ", i);
j = 15;
}
else {