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
b54d6451
Commit
b54d6451
authored
Oct 22, 2015
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsvdec: fix get_format and hwaccel_context handling
This enables the qsv transcoder to actually get activated
parent
dd8a4b0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
qsvdec.c
libavcodec/qsvdec.c
+17
-16
No files found.
libavcodec/qsvdec.c
View file @
b54d6451
...
...
@@ -58,24 +58,30 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt
AV_PIX_FMT_NV12
,
AV_PIX_FMT_NONE
};
ret
=
ff_get_format
(
avctx
,
pix_fmts
);
if
(
ret
<
0
)
return
ret
;
avctx
->
pix_fmt
=
ret
;
q
->
iopattern
=
MFX_IOPATTERN_OUT_SYSTEM_MEMORY
;
if
(
!
q
->
session
)
{
if
(
avctx
->
hwaccel_context
)
{
AVQSVContext
*
qsv
=
avctx
->
hwaccel_context
;
if
(
avctx
->
hwaccel_context
)
{
AVQSVContext
*
qsv
=
avctx
->
hwaccel_context
;
q
->
session
=
qsv
->
session
;
q
->
iopattern
=
qsv
->
iopattern
;
q
->
ext_buffers
=
qsv
->
ext_buffers
;
q
->
nb_ext_buffers
=
qsv
->
nb_ext_buffers
;
}
if
(
!
q
->
session
)
{
q
->
session
=
qsv
->
session
;
q
->
iopattern
=
qsv
->
iopattern
;
q
->
ext_buffers
=
qsv
->
ext_buffers
;
q
->
nb_ext_buffers
=
qsv
->
nb_ext_buffers
;
}
if
(
!
q
->
session
)
{
if
(
!
q
->
internal_qs
.
session
)
{
ret
=
ff_qsv_init_internal_session
(
avctx
,
&
q
->
internal_qs
,
q
->
load_plugins
);
if
(
ret
<
0
)
return
ret
;
q
->
session
=
q
->
internal_qs
.
session
;
}
q
->
session
=
q
->
internal_qs
.
session
;
}
if
(
avpkt
->
size
)
{
...
...
@@ -123,11 +129,6 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt
return
ff_qsv_error
(
ret
);
}
ret
=
ff_get_format
(
avctx
,
pix_fmts
);
if
(
ret
<
0
)
return
ret
;
avctx
->
pix_fmt
=
ret
;
avctx
->
profile
=
param
.
mfx
.
CodecProfile
;
avctx
->
level
=
param
.
mfx
.
CodecLevel
;
avctx
->
coded_width
=
param
.
mfx
.
FrameInfo
.
Width
;
...
...
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