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
8aa3c2df
Commit
8aa3c2df
authored
Mar 04, 2017
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsvdec: Allow use of hw_device_ctx to make the internal session
(cherry picked from commit
8848ba0b
)
parent
91c3b50d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
qsvdec.c
libavcodec/qsvdec.c
+14
-2
No files found.
libavcodec/qsvdec.c
View file @
8aa3c2df
...
...
@@ -42,7 +42,7 @@
#include "qsvdec.h"
static
int
qsv_init_session
(
AVCodecContext
*
avctx
,
QSVContext
*
q
,
mfxSession
session
,
AVBufferRef
*
hw_frames_ref
)
AVBufferRef
*
hw_frames_ref
,
AVBufferRef
*
hw_device_ref
)
{
int
ret
;
...
...
@@ -67,6 +67,18 @@ static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession ses
return
ret
;
}
q
->
session
=
q
->
internal_session
;
}
else
if
(
hw_device_ref
)
{
if
(
q
->
internal_session
)
{
MFXClose
(
q
->
internal_session
);
q
->
internal_session
=
NULL
;
}
ret
=
ff_qsv_init_session_device
(
avctx
,
&
q
->
internal_session
,
hw_device_ref
,
q
->
load_plugins
);
if
(
ret
<
0
)
return
ret
;
q
->
session
=
q
->
internal_session
;
}
else
{
if
(
!
q
->
internal_session
)
{
...
...
@@ -133,7 +145,7 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
iopattern
=
MFX_IOPATTERN_OUT_SYSTEM_MEMORY
;
q
->
iopattern
=
iopattern
;
ret
=
qsv_init_session
(
avctx
,
q
,
session
,
avctx
->
hw_frames_ctx
);
ret
=
qsv_init_session
(
avctx
,
q
,
session
,
avctx
->
hw_frames_ctx
,
avctx
->
hw_device_ctx
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error initializing an MFX session
\n
"
);
return
ret
;
...
...
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