An app can register a mlt_log callback, trap errors, and do something
more graceful than abort as perhaps some of these are not really as
fatal as they claim to be (a different patch can change the levels as
needed).
{
mlt_log_panic( MLT_PRODUCER_SERVICE( producer ), "Error, cannot render titles without an X11 environment.\nPlease either run melt from an X session or use a fake X server like xvfb:\nxvfb-run -a melt (...)\n" );
pthread_mutex_unlock( &self->mutex );
- exit(1);
return;
}
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
-
+#include <framework/mlt_log.h>
/*********************************************************************
* KLTError
va_list args;
va_start(args, fmt);
- fprintf(stderr, "KLT Error: ");
- vfprintf(stderr, fmt, args);
- fprintf(stderr, "\n");
+ mlt_log_error(NULL, "KLT Error: ");
+ mlt_log_error(NULL, fmt, args);
+ mlt_log_error(NULL, "\n");
va_end(args);
- exit(1);
}