]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
profile: fix the wrong data/conf/profiles context
authorJaroslav Kysela <perex@perex.cz>
Thu, 31 Aug 2017 16:48:24 +0000 (18:48 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Aug 2017 16:48:24 +0000 (18:48 +0200)
data/conf/profiles
src/profile.c
src/tvhlog.h

index f57fd137a4e63c562b73d97682ca04cc08b3e871..54b1bb33323b49d60f96ea23633d8fb550c6bdac 100644 (file)
@@ -5,12 +5,12 @@
        "name": "pass",
        "default": 1
     },
-    {,
+    {
        "comment": "Matroska",
        "class": "profile-matroska",
        "name": "matroska"
     },
-    {,
+    {
        "comment": "HTSP Default Stream Settings",
        "class": "profile-htsp",
        "name": "htsp"
index 0f7e531209af8b1dae6b2d1aefa0a797822b2e4c..2fede24645a826aa59e47cb9c4a4a5a01afded54 100644 (file)
@@ -2510,7 +2510,8 @@ transcoder_create:
   /* Assign the default profile if config files are corrupted */
   if (!profile_default) {
     pro = profile_find_by_name2("pass", NULL, 1);
-    assert(pro);
+    if (pro == NULL)
+      tvhabort(LS_PROFILE, "no default streaming profile! reinstall data files");
     profile_default = pro;
   }
 }
index 39774c6ec2a28d723c6c051b2ff0b98ad2007347..3708ff17b391754dca5033c1273579703bf7fce0 100644 (file)
@@ -234,6 +234,11 @@ static inline void tvhtrace_no_warnings(const char *fmt, ...) { (void)fmt; }
 #define tvhnotice(...) tvhlog(LOG_NOTICE,  ##__VA_ARGS__)
 #define tvherror(...)  tvhlog(LOG_ERR,     ##__VA_ARGS__)
 #define tvhalert(...)  tvhlog(LOG_ALERT,   ##__VA_ARGS__)
+#define tvhabort(...) do { \
+  tvhlog(LOG_ALERT,   ##__VA_ARGS__); \
+  tvh_safe_usleep(2000000); \
+  abort(); \
+} while (0)
 
 void tvhlog_backtrace_printf(const char *fmt, ...);