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
77d5ea1c
Commit
77d5ea1c
authored
Mar 20, 2020
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/frame: make frame copy functions hwframe aware
parent
b06ae06e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
frame.c
libavutil/frame.c
+9
-1
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/frame.c
View file @
77d5ea1c
...
...
@@ -25,6 +25,7 @@
#include "imgutils.h"
#include "mem.h"
#include "samplefmt.h"
#include "hwcontext.h"
#if FF_API_FRAME_GET_SET
MAKE_ACCESSORS
(
AVFrame
,
frame
,
int64_t
,
best_effort_timestamp
)
...
...
@@ -626,7 +627,11 @@ int av_frame_make_writable(AVFrame *frame)
tmp
.
channels
=
frame
->
channels
;
tmp
.
channel_layout
=
frame
->
channel_layout
;
tmp
.
nb_samples
=
frame
->
nb_samples
;
ret
=
av_frame_get_buffer
(
&
tmp
,
32
);
if
(
frame
->
hw_frames_ctx
)
ret
=
av_hwframe_get_buffer
(
frame
->
hw_frames_ctx
,
&
tmp
,
0
);
else
ret
=
av_frame_get_buffer
(
&
tmp
,
32
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -752,6 +757,9 @@ static int frame_copy_video(AVFrame *dst, const AVFrame *src)
dst
->
height
<
src
->
height
)
return
AVERROR
(
EINVAL
);
if
(
src
->
hw_frames_ctx
||
dst
->
hw_frames_ctx
)
return
av_hwframe_transfer_data
(
dst
,
src
,
0
);
planes
=
av_pix_fmt_count_planes
(
dst
->
format
);
for
(
i
=
0
;
i
<
planes
;
i
++
)
if
(
!
dst
->
data
[
i
]
||
!
src
->
data
[
i
])
...
...
libavutil/version.h
View file @
77d5ea1c
...
...
@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 42
#define LIBAVUTIL_VERSION_MICRO 10
1
#define LIBAVUTIL_VERSION_MICRO 10
2
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
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