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
f0ea96d8
Commit
f0ea96d8
authored
Sep 29, 2016
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/cuvid: use actual frame size for buffer allocation
parent
81bab107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cuvid.c
libavcodec/cuvid.c
+3
-3
No files found.
libavcodec/cuvid.c
View file @
f0ea96d8
...
...
@@ -199,8 +199,8 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
if
(
!
hwframe_ctx
->
pool
)
{
hwframe_ctx
->
format
=
AV_PIX_FMT_CUDA
;
hwframe_ctx
->
sw_format
=
AV_PIX_FMT_NV12
;
hwframe_ctx
->
width
=
FFALIGN
(
avctx
->
coded_
width
,
32
);
hwframe_ctx
->
height
=
FFALIGN
(
avctx
->
coded_
height
,
32
);
hwframe_ctx
->
width
=
FFALIGN
(
avctx
->
width
,
32
);
hwframe_ctx
->
height
=
FFALIGN
(
avctx
->
height
,
32
);
if
((
ctx
->
internal_error
=
av_hwframe_ctx_init
(
ctx
->
hwframe
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"av_hwframe_ctx_init failed
\n
"
);
...
...
@@ -397,7 +397,7 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
.
dstPitch
=
frame
->
linesize
[
i
],
.
srcY
=
offset
,
.
WidthInBytes
=
FFMIN
(
pitch
,
frame
->
linesize
[
i
]),
.
Height
=
avctx
->
coded_
height
>>
(
i
?
1
:
0
),
.
Height
=
avctx
->
height
>>
(
i
?
1
:
0
),
};
ret
=
CHECK_CU
(
cuMemcpy2D
(
&
cpy
));
...
...
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