]> git.sesse.net Git - mlt/commitdiff
Remove exit()s that cause unexpected app failures.
authorDan Dennedy <dan@dennedy.org>
Sun, 18 Nov 2012 01:33:11 +0000 (17:33 -0800)
committerDan Dennedy <dan@dennedy.org>
Sun, 18 Nov 2012 01:33:11 +0000 (17:33 -0800)
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).

src/modules/qimage/kdenlivetitle_wrapper.cpp
src/modules/videostab/stab/klt/error.c

index 54469905ad0beadba8eb20fbec94da9ca98c137a..a4d2a0d4106b3c360ae29624d1e41acaa9fbd9be 100755 (executable)
@@ -392,7 +392,6 @@ void drawKdenliveTitle( producer_ktitle self, mlt_frame frame, int width, int he
                                        {
                                                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
index 0731cf2cb6d3680109f457e8e1584366e4c3d7c2..5cb4ee4edb5492a6ec94b21d7254cc1e963c4434 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-
+#include <framework/mlt_log.h>
 
 /*********************************************************************
  * KLTError
@@ -25,11 +25,10 @@ void KLTError(char *fmt, ...)
   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);
 }