X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fhb-backend.c;h=f15fe0081c5a7ac09173e275b1d370d744e13334;hb=023bc0f853674db16682807936aabf77139c1bb7;hp=ab2bc2c5e0117519e15197a6a5f81cf9464c5308;hpb=e42642ad5cf15183d054619f243805e4dc2d2b02;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index ab2bc2c5..f15fe008 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1817,6 +1817,32 @@ ghb_longest_title() return titleindex; } +gchar* +ghb_get_source_audio_lang(gint titleindex, gint track) +{ + hb_list_t * list; + hb_title_t * title; + hb_audio_config_t * audio; + gchar *lang = NULL; + + g_debug("ghb_lookup_1st_audio_lang ()\n"); + if (h_scan == NULL) + return NULL; + list = hb_get_titles( h_scan ); + title = (hb_title_t*)hb_list_item( list, titleindex ); + if (title == NULL) + return NULL; + if (hb_list_count( title->list_audio ) <= track) + return NULL; + + audio = hb_list_audio_config_item(title->list_audio, track); + if (audio == NULL) + return NULL; + + lang = g_strdup(audio->lang.iso639_2); + return lang; +} + gint ghb_find_audio_track( gint titleindex, @@ -4178,6 +4204,10 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) job->x264opts = tmp_x264opts; } + else + { + job->x264opts = x264opts; + } job->sequence_id = (unique_id & 0xFFFFFF) | (sub_id++ << 24); hb_add( h, job ); //if (job->x264opts != NULL)