diff options
author | jstebbins <[email protected]> | 2013-06-28 16:54:16 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-06-28 16:54:16 +0000 |
commit | 3205e96f56e88154494624a4b217b0c5b0a2f7b1 (patch) | |
tree | a6b3c678d7e2937aa87a8d999231096e4d4f4080 | |
parent | 9eb156ddb5a0a4c13c8075e9f8998a80f5d65ff9 (diff) |
LinGui: use hb_container_get_default_extension() when creating dest filename
and fix a mostly harmless error in creating the dest filename that
is only seen before scanning any files.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5615 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/callbacks.c | 20 |
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; |