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
018601db
Commit
018601db
authored
Jul 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: inject sample skip side data when requested by the demuxer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c916af99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
avformat.h
libavformat/avformat.h
+5
-0
utils.c
libavformat/utils.c
+8
-0
No files found.
libavformat/avformat.h
View file @
018601db
...
...
@@ -805,6 +805,11 @@ typedef struct AVStream {
* should be discarded.
*/
int
skip_to_keyframe
;
/**
* Number of samples to skip at the start of the frame decoded from the next packet.
*/
int
skip_samples
;
}
AVStream
;
#define AV_PROGRAM_RUNNING 1
...
...
libavformat/utils.c
View file @
018601db
...
...
@@ -1450,6 +1450,14 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
}
return_packet
:
if
(
s
->
streams
[
pkt
->
stream_index
]
->
skip_samples
)
{
uint8_t
*
p
=
av_packet_new_side_data
(
pkt
,
AV_PKT_DATA_SKIP_SAMPLES
,
10
);
AV_WL32
(
p
,
s
->
streams
[
pkt
->
stream_index
]
->
skip_samples
);
av_log
(
s
,
AV_LOG_DEBUG
,
"demuxer injecting skip %d
\n
"
,
s
->
streams
[
pkt
->
stream_index
]
->
skip_samples
);
s
->
streams
[
pkt
->
stream_index
]
->
skip_samples
=
0
;
}
if
(
is_relative
(
pkt
->
dts
))
pkt
->
dts
-=
RELATIVE_TS_BASE
;
if
(
is_relative
(
pkt
->
pts
))
...
...
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