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
9f102653
Commit
9f102653
authored
Dec 26, 2016
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use av_stream_new_side_data()
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
faa94a57
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
ffmpeg.c
ffmpeg.c
+4
-13
No files found.
ffmpeg.c
View file @
9f102653
...
@@ -3062,23 +3062,14 @@ static int init_output_stream_streamcopy(OutputStream *ost)
...
@@ -3062,23 +3062,14 @@ static int init_output_stream_streamcopy(OutputStream *ost)
ost
->
st
->
disposition
=
ist
->
st
->
disposition
;
ost
->
st
->
disposition
=
ist
->
st
->
disposition
;
if
(
ist
->
st
->
nb_side_data
)
{
if
(
ist
->
st
->
nb_side_data
)
{
ost
->
st
->
side_data
=
av_realloc_array
(
NULL
,
ist
->
st
->
nb_side_data
,
sizeof
(
*
ist
->
st
->
side_data
));
if
(
!
ost
->
st
->
side_data
)
return
AVERROR
(
ENOMEM
);
ost
->
st
->
nb_side_data
=
0
;
for
(
i
=
0
;
i
<
ist
->
st
->
nb_side_data
;
i
++
)
{
for
(
i
=
0
;
i
<
ist
->
st
->
nb_side_data
;
i
++
)
{
const
AVPacketSideData
*
sd_src
=
&
ist
->
st
->
side_data
[
i
];
const
AVPacketSideData
*
sd_src
=
&
ist
->
st
->
side_data
[
i
];
AVPacketSideData
*
sd_dst
=
&
ost
->
st
->
side_data
[
ost
->
st
->
nb_side_data
]
;
uint8_t
*
dst_data
;
sd_dst
->
data
=
av_malloc
(
sd_src
->
size
);
dst_data
=
av_stream_new_side_data
(
ost
->
st
,
sd_src
->
type
,
sd_src
->
size
);
if
(
!
sd_dst
->
data
)
if
(
!
dst_
data
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
memcpy
(
sd_dst
->
data
,
sd_src
->
data
,
sd_src
->
size
);
memcpy
(
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
++
;
}
}
}
}
...
...
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