Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
x264
Commits
d38bce2c
Commit
d38bce2c
authored
Nov 20, 2009
by
Steven Walters
Committed by
Fiona Glaser
Nov 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix extremely rare deadlock with sync-lookahead
Patch partially by Anton Mitrofanov.
parent
c86a6de2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
encoder/encoder.c
encoder/encoder.c
+2
-0
encoder/lookahead.c
encoder/lookahead.c
+2
-0
No files found.
encoder/encoder.c
View file @
d38bce2c
...
...
@@ -1958,8 +1958,10 @@ int x264_encoder_encode( x264_t *h,
else
{
/* signal kills for lookahead thread */
x264_pthread_mutex_lock
(
&
h
->
lookahead
->
ifbuf
.
mutex
);
h
->
lookahead
->
b_exit_thread
=
1
;
x264_pthread_cond_broadcast
(
&
h
->
lookahead
->
ifbuf
.
cv_fill
);
x264_pthread_mutex_unlock
(
&
h
->
lookahead
->
ifbuf
.
mutex
);
}
h
->
i_frame
++
;
...
...
encoder/lookahead.c
View file @
d38bce2c
...
...
@@ -166,8 +166,10 @@ void x264_lookahead_delete( x264_t *h )
{
if
(
h
->
param
.
i_sync_lookahead
)
{
x264_pthread_mutex_lock
(
&
h
->
lookahead
->
ifbuf
.
mutex
);
h
->
lookahead
->
b_exit_thread
=
1
;
x264_pthread_cond_broadcast
(
&
h
->
lookahead
->
ifbuf
.
cv_fill
);
x264_pthread_mutex_unlock
(
&
h
->
lookahead
->
ifbuf
.
mutex
);
x264_pthread_join
(
h
->
thread
[
h
->
param
.
i_threads
]
->
thread_handle
,
NULL
);
x264_macroblock_cache_end
(
h
->
thread
[
h
->
param
.
i_threads
]
);
x264_free
(
h
->
thread
[
h
->
param
.
i_threads
]
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment