Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8f0db04b
Commit
8f0db04b
authored
Apr 25, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/pthread: use THREAD_SAFE_CALLBACKS() to simplifx more code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
94b3a666
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
pthread.c
libavcodec/pthread.c
+2
-10
No files found.
libavcodec/pthread.c
View file @
8f0db04b
...
@@ -959,11 +959,7 @@ int ff_thread_can_start_frame(AVCodecContext *avctx)
...
@@ -959,11 +959,7 @@ int ff_thread_can_start_frame(AVCodecContext *avctx)
{
{
PerThreadContext
*
p
=
avctx
->
thread_opaque
;
PerThreadContext
*
p
=
avctx
->
thread_opaque
;
if
((
avctx
->
active_thread_type
&
FF_THREAD_FRAME
)
&&
p
->
state
!=
STATE_SETTING_UP
&&
if
((
avctx
->
active_thread_type
&
FF_THREAD_FRAME
)
&&
p
->
state
!=
STATE_SETTING_UP
&&
(
avctx
->
codec
->
update_thread_context
||
(
!
avctx
->
thread_safe_callbacks
&&
(
(
avctx
->
codec
->
update_thread_context
||
!
THREAD_SAFE_CALLBACKS
(
avctx
)))
{
#if FF_API_GET_BUFFER
avctx
->
get_buffer
||
#endif
avctx
->
get_buffer2
!=
avcodec_default_get_buffer2
))))
{
return
0
;
return
0
;
}
}
return
1
;
return
1
;
...
@@ -982,11 +978,7 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
...
@@ -982,11 +978,7 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
return
ff_get_buffer
(
avctx
,
f
->
f
,
flags
);
return
ff_get_buffer
(
avctx
,
f
->
f
,
flags
);
if
(
p
->
state
!=
STATE_SETTING_UP
&&
if
(
p
->
state
!=
STATE_SETTING_UP
&&
(
avctx
->
codec
->
update_thread_context
||
(
!
avctx
->
thread_safe_callbacks
&&
(
(
avctx
->
codec
->
update_thread_context
||
!
THREAD_SAFE_CALLBACKS
(
avctx
)))
{
#if FF_API_GET_BUFFER
avctx
->
get_buffer
||
#endif
avctx
->
get_buffer2
!=
avcodec_default_get_buffer2
))))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() cannot be called after ff_thread_finish_setup()
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() cannot be called after ff_thread_finish_setup()
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
...
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