projects
/
handbrake
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d31b9c
)
sync: fix race condition that caused double free
author
John Stebbins
<jstebbins.hb@gmail.com>
Tue, 17 May 2016 20:59:10 +0000
(14:59 -0600)
committer
John Stebbins
<jstebbins.hb@gmail.com>
Tue, 17 May 2016 20:59:10 +0000
(14:59 -0600)
libhb/sync.c
patch
|
blob
|
history
diff --git
a/libhb/sync.c
b/libhb/sync.c
index 69e6d18e455f28f007ee9aa2704953124c428dd8..4e5f7662e662792b1c54f66b48ab1961d46cdd26 100644
(file)
--- a/
libhb/sync.c
+++ b/
libhb/sync.c
@@
-684,6
+684,8
@@
static void sendEof( sync_common_t * common )
static void streamFlush( sync_stream_t * stream )
{
+ hb_lock(stream->common->mutex);
+
while (hb_list_count(stream->in_queue) > 0)
{
if (!stream->common->found_first_pts)
@@
-777,6
+779,8
@@
static void streamFlush( sync_stream_t * stream )
}
}
hb_buffer_list_append(&stream->out_queue, hb_buffer_eof_init());
+
+ hb_unlock(stream->common->mutex);
}
static void log_chapter( sync_common_t *common, int chap_num,