diff options
author | jstebbins <[email protected]> | 2010-01-20 21:17:27 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-01-20 21:17:27 +0000 |
commit | c5f4eea4c283771274b22ccf80fbb2af7e6f681f (patch) | |
tree | 61be212bf1ce2a8895ba185261ccabf9f87af442 /gtk/src | |
parent | 8d85eac5e739572e79f846059991ad31e9cd6774 (diff) |
fix cancel during p-to-p search
when canceling, video sync was closed, but audio sync was stuck waiting
on a condition variable. so force audio sync to wake up when video sync
closes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3078 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/hb-backend.c | 14 |
1 files changed, 6 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); |