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
a6b3471c
Commit
a6b3471c
authored
May 21, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: add needs_parsing type to enable codec TS use.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
696452e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
avformat.h
libavformat/avformat.h
+1
-0
utils.c
libavformat/utils.c
+8
-2
No files found.
libavformat/avformat.h
View file @
a6b3471c
...
...
@@ -574,6 +574,7 @@ enum AVStreamParseType {
AVSTREAM_PARSE_HEADERS
,
/**< Only parse headers, do not repack. */
AVSTREAM_PARSE_TIMESTAMPS
,
/**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */
AVSTREAM_PARSE_FULL_ONCE
,
/**< full parsing and repack of the first frame only, only implemented for H.264 currently */
AVSTREAM_PARSE_FULL_RAW
=
MKTAG
(
0
,
'R'
,
'A'
,
'W'
),
/**< full parsing and repack with timestamp generation for raw */
};
typedef
struct
AVIndexEntry
{
...
...
libavformat/utils.c
View file @
a6b3471c
...
...
@@ -1316,6 +1316,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
st
->
parser
->
flags
|=
PARSER_FLAG_COMPLETE_FRAMES
;
}
else
if
(
st
->
need_parsing
==
AVSTREAM_PARSE_FULL_ONCE
)
{
st
->
parser
->
flags
|=
PARSER_FLAG_ONCE
;
}
else
if
(
st
->
need_parsing
==
AVSTREAM_PARSE_FULL_RAW
)
{
st
->
parser
->
flags
|=
PARSER_FLAG_USE_CODEC_TS
;
}
}
...
...
@@ -2456,8 +2458,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
//only for the split stuff
if
(
!
st
->
parser
&&
!
(
ic
->
flags
&
AVFMT_FLAG_NOPARSE
))
{
st
->
parser
=
av_parser_init
(
st
->
codec
->
codec_id
);
if
(
st
->
need_parsing
==
AVSTREAM_PARSE_HEADERS
&&
st
->
parser
){
st
->
parser
->
flags
|=
PARSER_FLAG_COMPLETE_FRAMES
;
if
(
st
->
parser
){
if
(
st
->
need_parsing
==
AVSTREAM_PARSE_HEADERS
){
st
->
parser
->
flags
|=
PARSER_FLAG_COMPLETE_FRAMES
;
}
else
if
(
st
->
need_parsing
==
AVSTREAM_PARSE_FULL_RAW
)
{
st
->
parser
->
flags
|=
PARSER_FLAG_USE_CODEC_TS
;
}
}
}
codec
=
st
->
codec
->
codec
?
st
->
codec
->
codec
:
...
...
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