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
d37125fb
Commit
d37125fb
authored
Aug 07, 2018
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/flvdec: add flv_ignore_prevtag option into flvdec
Signed-off-by:
Steven Liu
<
lq@chinaffmpeg.org
>
parent
d54ae9b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
demuxers.texi
doc/demuxers.texi
+3
-0
flvdec.c
libavformat/flvdec.c
+4
-0
No files found.
doc/demuxers.texi
View file @
d37125fb
...
...
@@ -269,6 +269,9 @@ ffmpeg -f live_flv -i rtmp://<any.server>/anything/key ....
@table @option
@item -flv_metadata @var{bool}
Allocate the streams according to the onMetaData array content.
@item -flv_ignore_prevtag @var{bool}
Ignore the size of previous tag value.
@end table
@section gif
...
...
libavformat/flvdec.c
View file @
d37125fb
...
...
@@ -44,6 +44,7 @@
typedef
struct
FLVContext
{
const
AVClass
*
class
;
///< Class for private options.
int
trust_metadata
;
///< configure streams according onMetaData
int
trust_datasize
;
///< trust data size of FLVTag
int
wrong_dts
;
///< wrong dts due to negative cts
uint8_t
*
new_extradata
[
FLV_STREAM_TYPE_NB
];
int
new_extradata_size
[
FLV_STREAM_TYPE_NB
];
...
...
@@ -1250,6 +1251,7 @@ retry_duration:
leave:
last
=
avio_rb32
(
s
->
pb
);
if
(
!
flv
->
trust_datasize
)
{
if
(
last
!=
orig_size
+
11
&&
last
!=
orig_size
+
10
&&
!
avio_feof
(
s
->
pb
)
&&
(
last
!=
orig_size
||
!
last
)
&&
last
!=
flv
->
sum_flv_tag_size
&&
...
...
@@ -1262,6 +1264,7 @@ leave:
goto
retry
;
}
}
}
return
ret
;
}
...
...
@@ -1277,6 +1280,7 @@ static int flv_read_seek(AVFormatContext *s, int stream_index,
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static
const
AVOption
options
[]
=
{
{
"flv_metadata"
,
"Allocate streams according to the onMetaData array"
,
OFFSET
(
trust_metadata
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VD
},
{
"flv_ignore_prevtag"
,
"Ignore the Size of previous tag"
,
OFFSET
(
trust_datasize
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VD
},
{
"missing_streams"
,
""
,
OFFSET
(
missing_streams
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
0xFF
,
VD
|
AV_OPT_FLAG_EXPORT
|
AV_OPT_FLAG_READONLY
},
{
NULL
}
};
...
...
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