]> granicus.if.org Git - handbrake/commitdiff
LinGui: make values for preset key AudioEncoderFallback compatible with mac ui
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 22 Aug 2011 16:10:31 +0000 (16:10 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 22 Aug 2011 16:10:31 +0000 (16:10 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4191 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/presets.c

index 241fa2b3af0ad897a7c18163e1606b9998fd5873..2ee26fe6d4b1da8aa7022fe180cb0087b9ab570b 100644 (file)
@@ -2002,8 +2002,8 @@ static value_map_t acodec_xlat[] =
        {"AAC (faac)", "faac"},
        {"AAC (CoreAudio)", "faac"},
        {"HE-AAC (CoreAudio)", "faac"},
-       {"AC3", "ac3"},                 // Backwards compatibility with mac ui
        {"AC3 (ffmpeg)", "ac3"},
+       {"AC3", "ac3"},                 // Backwards compatibility with mac ui
        {"MP3 Passthru", "mp3pass"},
        {"AAC Passthru", "aacpass"},
        {"AC3 Passthru", "ac3pass"},
@@ -2345,6 +2345,12 @@ export_value_xlat(GValue *dict)
        GValue *alist;
        GValue *adict;
 
+       key = "AudioEncoderFallback";
+       lin_val = ghb_dict_lookup(dict, key);
+       gval = export_value_xlat2(acodec_xlat, lin_val, G_TYPE_STRING);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+
        alist = ghb_dict_lookup(dict, "AudioList");
        count = ghb_array_len(alist);
        for (ii = 0; ii < count; ii++)
@@ -2563,6 +2569,12 @@ import_value_xlat(GValue *dict)
        GValue *adefaults;
        GValue *adeflist;
 
+       key = "AudioEncoderFallback";
+       mac_val = ghb_dict_lookup(dict, key);
+       gval = import_value_xlat2(adefaults, acodec_xlat, key, mac_val);
+       if (gval)
+               ghb_dict_insert(dict, g_strdup(key), gval);
+
        adeflist = ghb_dict_lookup(defaults, "AudioList");
        if (adeflist)
        {