Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
456
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
bf9b9955
Commit
bf9b9955
authored
10 years ago
by
flx42
Browse files
Options
Downloads
Patches
Plain Diff
avcodec: disable frame multithreading with dxva2
Fix
#11930
,
#11693
parent
3be0dbaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/codec/avcodec/video.c
+15
-0
15 additions, 0 deletions
modules/codec/avcodec/video.c
with
15 additions
and
0 deletions
modules/codec/avcodec/video.c
+
15
−
0
View file @
bf9b9955
...
...
@@ -347,6 +347,21 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
# endif
}
/* Workaround: frame multithreading is not compatible with
* DXVA2. When a frame is being copied to host memory, the frame
* is locked and cannot be used as a reference frame
* simultaneously and thus decoding fails for some frames. This
* causes major image corruption. */
# if defined(_WIN32)
char
*
avcodec_hw
=
var_InheritString
(
p_dec
,
"avcodec-hw"
);
if
(
avcodec_hw
==
NULL
||
strcasecmp
(
avcodec_hw
,
"none"
)
)
{
msg_Warn
(
p_dec
,
"threaded frame decoding is not compatible with DXVA2, disabled"
);
p_sys
->
p_context
->
thread_type
&=
~
FF_THREAD_FRAME
;
}
free
(
avcodec_hw
);
# endif
if
(
p_sys
->
p_context
->
thread_type
&
FF_THREAD_FRAME
)
p_dec
->
i_extra_picture_buffers
=
2
*
p_sys
->
p_context
->
thread_count
;
#endif
...
...
This diff is collapsed.
Click to expand it.
Migration Bot
@MigrationBot
mentioned in issue
#11693 (closed)
·
4 years ago
mentioned in issue
#11693 (closed)
mentioned in issue #11693
Toggle commit list
Migration Bot
@MigrationBot
mentioned in issue
#11930 (closed)
·
4 years ago
mentioned in issue
#11930 (closed)
mentioned in issue #11930
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment