summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index eead66275..fed28a22a 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -563,21 +563,17 @@ static const gchar*
get_extension(GValue *settings)
{
int container;
- const gchar *extension = "error";
+ const gchar *extension;
container = ghb_settings_combo_int(settings, "FileFormat");
- if (container == HB_MUX_MP4)
- {
- extension = "mp4";
- if (ghb_settings_get_boolean(settings, "UseM4v"))
- {
- extension = "m4v";
- }
- }
- else if (container == HB_MUX_MKV)
+ if ((container & HB_MUX_MASK_MP4) &&
+ ghb_settings_get_boolean(settings, "UseM4v"))
{
- extension = "mkv";
+ return "m4v";
}
+ extension = hb_container_get_default_extension(container);
+ if (extension == NULL)
+ extension = "error";
return extension;
}
@@ -1082,7 +1078,7 @@ dvd_source_activate_cb(GtkAction *action, signal_user_data_t *ud)
void
ghb_update_destination_extension(signal_user_data_t *ud)
{
- static gchar *containers[] = {".mkv", ".mp4", ".m4v", NULL};
+ static gchar *containers[] = {".mkv", ".mp4", ".m4v", ".error", NULL};
gchar *filename;
const gchar *extension;
gint ii;