Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c31458c3
Commit
c31458c3
authored
Feb 13, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/concat: compute duration if possible.
parent
9b211c43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
concatdec.c
libavformat/concatdec.c
+13
-0
No files found.
libavformat/concatdec.c
View file @
c31458c3
...
...
@@ -157,6 +157,7 @@ static int concat_read_header(AVFormatContext *avf)
unsigned
nb_files_alloc
=
0
;
ConcatFile
*
file
=
NULL
;
AVStream
*
st
,
*
source_st
;
int64_t
time
=
0
;
while
(
1
)
{
if
((
ret
=
ff_get_line
(
avf
->
pb
,
buf
,
sizeof
(
buf
)))
<=
0
)
...
...
@@ -207,6 +208,18 @@ static int concat_read_header(AVFormatContext *avf)
if
(
ret
<
0
)
FAIL
(
ret
);
for
(
i
=
0
;
i
<
cat
->
nb_files
;
i
++
)
{
if
(
cat
->
files
[
i
].
start_time
==
AV_NOPTS_VALUE
)
cat
->
files
[
i
].
start_time
=
time
;
else
time
=
cat
->
files
[
i
].
start_time
;
if
(
cat
->
files
[
i
].
duration
==
AV_NOPTS_VALUE
)
break
;
time
+=
cat
->
files
[
i
].
duration
;
}
if
(
i
==
cat
->
nb_files
)
avf
->
duration
=
time
;
if
((
ret
=
open_file
(
avf
,
0
))
<
0
)
FAIL
(
ret
);
for
(
i
=
0
;
i
<
cat
->
avf
->
nb_streams
;
i
++
)
{
...
...
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