summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/src/hb-backend.c14
-rw-r--r--libhb/sync.c5
2 files changed, 11 insertions, 8 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 44de3c2d9..fb76aa7c2 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -3166,6 +3166,7 @@ ghb_track_status()
hb_status.queue.state &= ~GHB_STATE_MUXING;
hb_status.queue.state &= ~GHB_STATE_PAUSED;
hb_status.queue.state &= ~GHB_STATE_WORKING;
+ hb_status.queue.state &= ~GHB_STATE_SEARCHING;
switch (p.error)
{
case HB_ERROR_NONE:
@@ -4318,22 +4319,19 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
chapters = ghb_settings_get_value(js, "chapter_list");
count = ghb_array_len(chapters);
- for(chap = start; chap <= end; chap++)
+ for(chap = 0; chap < count; chap++)
{
hb_chapter_t * chapter_s;
gchar *name;
name = NULL;
- if (chap-1 < count)
- {
- chapter = ghb_array_get_nth(chapters, chap-1);
- name = ghb_value_string(chapter);
- }
+ chapter = ghb_array_get_nth(chapters, chap);
+ name = ghb_value_string(chapter);
if (name == NULL)
{
- name = g_strdup_printf ("Chapter %2d", chap);
+ name = g_strdup_printf ("Chapter %2d", chap+1);
}
- chapter_s = hb_list_item( job->title->list_chapter, chap - 1);
+ chapter_s = hb_list_item( job->title->list_chapter, chap);
strncpy(chapter_s->title, name, 1023);
chapter_s->title[1023] = '\0';
g_free(name);
diff --git a/libhb/sync.c b/libhb/sync.c
index 58fba19dc..31c9583ab 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -197,6 +197,11 @@ void syncVideoClose( hb_work_object_t * w )
hb_job_t * job = pv->job;
hb_sync_video_t * sync = &pv->type.video;
+ // Wake up audio sync if it's still waiting on condition.
+ pv->common->pts_offset = 0;
+ pv->common->start_found = 1;
+ hb_cond_broadcast( pv->common->next_frame );
+
if( sync->cur )
{
hb_buffer_close( &sync->cur );