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
dbdaebe2
Commit
dbdaebe2
authored
Mar 16, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract duration
Originally committed as revision 5171 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
60a9cc58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
flvdec.c
libavformat/flvdec.c
+12
-1
No files found.
libavformat/flvdec.c
View file @
dbdaebe2
...
...
@@ -34,7 +34,7 @@ static int flv_probe(AVProbeData *p)
static
int
flv_read_header
(
AVFormatContext
*
s
,
AVFormatParameters
*
ap
)
{
int
offset
,
flags
;
int
offset
,
flags
,
size
;
s
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
//ok we have a header but theres no fps, codec type, sample_rate, ...
...
...
@@ -42,6 +42,17 @@ static int flv_read_header(AVFormatContext *s,
flags
=
get_byte
(
&
s
->
pb
);
offset
=
get_be32
(
&
s
->
pb
);
if
(
!
url_is_streamed
(
&
s
->
pb
)){
const
int
fsize
=
url_fsize
(
&
s
->
pb
);
url_fseek
(
&
s
->
pb
,
fsize
-
4
,
SEEK_SET
);
size
=
get_be32
(
&
s
->
pb
);
url_fseek
(
&
s
->
pb
,
fsize
-
3
-
size
,
SEEK_SET
);
if
(
size
==
get_be24
(
&
s
->
pb
)
+
11
){
s
->
duration
=
get_be24
(
&
s
->
pb
)
*
(
int64_t
)
AV_TIME_BASE
/
1000
;
}
}
url_fseek
(
&
s
->
pb
,
offset
,
SEEK_SET
);
return
0
;
...
...
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