diff options
author | jstebbins <[email protected]> | 2009-09-30 15:34:07 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-09-30 15:34:07 +0000 |
commit | 5a335ad33b7894306cf73588aaf71547ab088fd2 (patch) | |
tree | 48f263f393bc0ddd90a30dc5a24ece05a76b5b65 | |
parent | 6a2e47339a1dd65c4866c1d907f6b74565953e02 (diff) |
LinGui: fix incorrect marking of CC track as forced or burned
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2855 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/hb-backend.c | 15 | ||||
-rw-r--r-- | gtk/src/hb-backend.h | 3 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.c | 8 |
3 files changed, 17 insertions, 9 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 5d1946678..5aa1f6378 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2193,10 +2193,12 @@ ghb_find_cc_track(gint titleindex) gint ghb_find_subtitle_track( - gint titleindex, - const gchar *lang, - gint source, - GHashTable *track_indices) + gint titleindex, + const gchar * lang, + gboolean burn, + gboolean force, + gint source, + GHashTable * track_indices) { hb_list_t * list; hb_title_t * title; @@ -2241,8 +2243,9 @@ ghb_find_subtitle_track( continue; subtitle = (hb_subtitle_t*)hb_list_item( title->list_subtitle, ii ); - if ((strcmp(lang, subtitle->iso639_2) == 0) || - (strcmp(lang, "und") == 0)) + if (((burn || force) && (subtitle->source == VOBSUB)) && + ((strcmp(lang, subtitle->iso639_2) == 0) || + (strcmp(lang, "und") == 0))) { used[ii] = TRUE; return ii; diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index 9c1359f65..e2470da70 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -143,7 +143,8 @@ gint ghb_find_audio_track( void ghb_add_all_subtitles(signal_user_data_t *ud, gint titleindex); gint ghb_find_pref_subtitle_track(const gchar *lang); gint ghb_find_subtitle_track( - gint titleindex, const gchar *lang, gint source, GHashTable *track_indices); + gint titleindex, const gchar *lang, gboolean burn, + gboolean force, gint source, GHashTable *track_indices); gint ghb_pick_subtitle_track(signal_user_data_t *ud); gint ghb_find_cc_track(gint titleindex); gint ghb_longest_title(void); diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index f26303925..b781cfb79 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -329,14 +329,18 @@ ghb_set_pref_subtitle(gint titleindex, signal_user_data_t *ud) for (ii = 0; ii < count; ii++) { gint source; + gboolean force, burn; subtitle = ghb_array_get_nth(pref_subtitle, ii); lang = ghb_settings_get_string(subtitle, "SubtitleLanguage"); source = ghb_settings_get_int(subtitle, "SubtitleSource"); + burn = ghb_settings_get_boolean(subtitle, "SubtitleBurned"); + force = ghb_settings_get_boolean(subtitle, "SubtitleForced"); // If there are multiple subtitles using the same language, then // select sequential tracks for each. The hash keeps track // of the tracks used for each language. - track = ghb_find_subtitle_track(titleindex, lang, source, track_indices); + track = ghb_find_subtitle_track(titleindex, lang, burn, + force, source, track_indices); g_free(lang); if (track >= -1) { @@ -366,7 +370,7 @@ ghb_set_pref_subtitle(gint titleindex, signal_user_data_t *ud) GValue *settings; gboolean burn; - track = ghb_find_subtitle_track(titleindex, pref_lang, VOBSUB, track_indices); + track = ghb_find_subtitle_track(titleindex, pref_lang, FALSE, FALSE, VOBSUB, track_indices); if (track >= -1) { burn = mustBurn(ud, track); |