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
59444c76
Commit
59444c76
authored
Feb 19, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: add stream-global side data to the first demuxed packet
parent
4a0f6651
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
avconv.c
avconv.c
+17
-0
avconv.h
avconv.h
+3
-0
No files found.
avconv.c
View file @
59444c76
...
...
@@ -2223,9 +2223,26 @@ static int process_input(void)
goto
discard_packet
;
ist
=
input_streams
[
ifile
->
ist_index
+
pkt
.
stream_index
];
ist
->
nb_packets
++
;
if
(
ist
->
discard
)
goto
discard_packet
;
/* add the stream-global side data to the first packet */
if
(
ist
->
nb_packets
==
1
)
for
(
i
=
0
;
i
<
ist
->
st
->
nb_side_data
;
i
++
)
{
AVPacketSideData
*
src_sd
=
&
ist
->
st
->
side_data
[
i
];
uint8_t
*
dst_data
;
if
(
av_packet_get_side_data
(
&
pkt
,
src_sd
->
type
,
NULL
))
continue
;
dst_data
=
av_packet_new_side_data
(
&
pkt
,
src_sd
->
type
,
src_sd
->
size
);
if
(
!
dst_data
)
exit_program
(
1
);
memcpy
(
dst_data
,
src_sd
->
data
,
src_sd
->
size
);
}
if
(
pkt
.
dts
!=
AV_NOPTS_VALUE
)
pkt
.
dts
+=
av_rescale_q
(
ifile
->
ts_offset
,
AV_TIME_BASE_Q
,
ist
->
st
->
time_base
);
if
(
pkt
.
pts
!=
AV_NOPTS_VALUE
)
...
...
avconv.h
View file @
59444c76
...
...
@@ -233,6 +233,9 @@ typedef struct InputStream {
AVDictionary
*
opts
;
AVRational
framerate
;
/* framerate forced with -r */
/* number of packets successfully read for this stream */
uint64_t
nb_packets
;
int
resample_height
;
int
resample_width
;
int
resample_pix_fmt
;
...
...
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