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
b438a786
Commit
b438a786
authored
Apr 08, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use av_stream_new_side_data() in init_output_stream
parent
d0a31431
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
ffmpeg.c
ffmpeg.c
+4
-12
No files found.
ffmpeg.c
View file @
b438a786
...
...
@@ -3458,22 +3458,14 @@ static int init_output_stream(OutputStream *ost, char *error, int error_len)
if
(
ost
->
enc_ctx
->
nb_coded_side_data
)
{
int
i
;
ost
->
st
->
side_data
=
av_realloc_array
(
NULL
,
ost
->
enc_ctx
->
nb_coded_side_data
,
sizeof
(
*
ost
->
st
->
side_data
));
if
(
!
ost
->
st
->
side_data
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
ost
->
enc_ctx
->
nb_coded_side_data
;
i
++
)
{
const
AVPacketSideData
*
sd_src
=
&
ost
->
enc_ctx
->
coded_side_data
[
i
];
AVPacketSideData
*
sd_dst
=
&
ost
->
st
->
side_data
[
i
]
;
uint8_t
*
dst_data
;
sd_dst
->
data
=
av_malloc
(
sd_src
->
size
);
if
(
!
sd_dst
->
data
)
dst_data
=
av_stream_new_side_data
(
ost
->
st
,
sd_src
->
type
,
sd_src
->
size
);
if
(
!
dst_
data
)
return
AVERROR
(
ENOMEM
);
memcpy
(
sd_dst
->
data
,
sd_src
->
data
,
sd_src
->
size
);
sd_dst
->
size
=
sd_src
->
size
;
sd_dst
->
type
=
sd_src
->
type
;
ost
->
st
->
nb_side_data
++
;
memcpy
(
dst_data
,
sd_src
->
data
,
sd_src
->
size
);
}
}
...
...
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