diff options
-rw-r--r-- | gtk/src/callbacks.c | 9 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 23 |
2 files changed, 28 insertions, 4 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 91f4f1f49..7632a61db 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -4612,7 +4612,14 @@ format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) { case HB_VCODEC_X264: { - return g_strdup_printf("RF: %.4g", val); + if (val == 0.0) + { + return g_strdup_printf("RF: %.4g (Warning: lossless)", val); + } + else + { + return g_strdup_printf("RF: %.4g", val); + } } break; case HB_VCODEC_FFMPEG: diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 04d262eaa..c1f6e86f8 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -4339,11 +4339,28 @@ ghb_validate_vquality(GValue *settings) max = 62; } break; } - if (vquality < min || vquality > max) + if (vcodec == HB_VCODEC_X264 && vquality == 0.0) { message = g_strdup_printf( - "Interesting video quality choise: %d\n\n" - "Typical values range from %d to %d.\n" + "Warning: lossless h.264 selected\n\n" + "Lossless h.264 is not well supported by\n" + "many players and editors.\n\n" + "It will produce enormous output files.\n\n" + "Are you sure you wish to use this setting?", + (gint)vquality, min, max); + if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, + "Cancel", "Continue")) + { + g_free(message); + return FALSE; + } + g_free(message); + } + else if (vquality < min || vquality > max) + { + message = g_strdup_printf( + "Interesting video quality choice: %d\n\n" + "Typical values range from %d to %d.\n\n" "Are you sure you wish to use this setting?", (gint)vquality, min, max); if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, |