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
28e9ba95
Commit
28e9ba95
authored
Aug 17, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dnxhdenc: call slice thread code only if slice threading is enabled
parent
92da2309
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
dnxhdenc.c
libavcodec/dnxhdenc.c
+10
-6
No files found.
libavcodec/dnxhdenc.c
View file @
28e9ba95
...
...
@@ -526,9 +526,11 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
if
(
avctx
->
thread_count
>
MAX_THREADS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"too many threads
\n
"
);
return
AVERROR
(
EINVAL
);
if
(
avctx
->
active_thread_type
==
FF_THREAD_SLICE
)
{
if
(
avctx
->
thread_count
>
MAX_THREADS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"too many threads
\n
"
);
return
AVERROR
(
EINVAL
);
}
}
if
(
avctx
->
qmax
<=
1
)
{
...
...
@@ -537,9 +539,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
ctx
->
thread
[
0
]
=
ctx
;
for
(
i
=
1
;
i
<
avctx
->
thread_count
;
i
++
)
{
ctx
->
thread
[
i
]
=
av_malloc
(
sizeof
(
DNXHDEncContext
));
memcpy
(
ctx
->
thread
[
i
],
ctx
,
sizeof
(
DNXHDEncContext
));
if
(
avctx
->
active_thread_type
==
FF_THREAD_SLICE
)
{
for
(
i
=
1
;
i
<
avctx
->
thread_count
;
i
++
)
{
ctx
->
thread
[
i
]
=
av_malloc
(
sizeof
(
DNXHDEncContext
));
memcpy
(
ctx
->
thread
[
i
],
ctx
,
sizeof
(
DNXHDEncContext
));
}
}
return
0
;
...
...
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