filters: Fix generation of filter string
authorjstebbins <jstebbins.hb@gmail.com>
Sat, 18 Apr 2015 18:34:38 +0000 (18:34 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sat, 18 Apr 2015 18:34:38 +0000 (18:34 +0000)
When there is no "tune" and extra ':' was added to the end of the string
and caused a failure to validate the filter settings.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7101 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/param.c

index 29315e44dfc68ea6dec2136dec3d23f163e73ec5..98b7fbc23e30f51437e54080c967d50354c1dc46 100644 (file)
@@ -437,7 +437,8 @@ generate_generic_settings(int filter_id, const char *preset, const char *tune)
         }
         else if (preset_entry->settings != NULL)
         {
-            opt = hb_strdup_printf("%s:%s", preset_entry->settings,
+            opt = hb_strdup_printf("%s%s%s", preset_entry->settings,
+                    tune_entry != NULL ? ":" : "",
                     tune_entry != NULL ? tune_entry->settings : "");
         }
     }