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
23ffe323
Commit
23ffe323
authored
Jun 29, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-t + capture bugfix
Originally committed as revision 3266 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
c75f51f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
ffmpeg.c
ffmpeg.c
+19
-17
No files found.
ffmpeg.c
View file @
23ffe323
...
@@ -1692,8 +1692,9 @@ static int av_encode(AVFormatContext **output_files,
...
@@ -1692,8 +1692,9 @@ static int av_encode(AVFormatContext **output_files,
for
(;
received_sigterm
==
0
;)
{
for
(;
received_sigterm
==
0
;)
{
int
file_index
,
ist_index
;
int
file_index
,
ist_index
;
AVPacket
pkt
;
AVPacket
pkt
;
double
pts_min
;
double
ipts_min
=
1e100
;
double
opts_min
=
1e100
;
redo
:
redo
:
/* if 'q' pressed, exits */
/* if 'q' pressed, exits */
if
(
!
using_stdin
)
{
if
(
!
using_stdin
)
{
...
@@ -1708,24 +1709,25 @@ static int av_encode(AVFormatContext **output_files,
...
@@ -1708,24 +1709,25 @@ static int av_encode(AVFormatContext **output_files,
/* select the stream that we must read now by looking at the
/* select the stream that we must read now by looking at the
smallest output pts */
smallest output pts */
file_index
=
-
1
;
file_index
=
-
1
;
pts_min
=
1e100
;
for
(
i
=
0
;
i
<
nb_ostreams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_ostreams
;
i
++
)
{
double
pts
;
double
ipts
,
o
pts
;
ost
=
ost_table
[
i
];
ost
=
ost_table
[
i
];
os
=
output_files
[
ost
->
file_index
];
os
=
output_files
[
ost
->
file_index
];
ist
=
ist_table
[
ost
->
source_index
];
ist
=
ist_table
[
ost
->
source_index
];
if
(
input_sync
==
0
)
{
if
(
ost
->
st
->
codec
.
codec_type
==
CODEC_TYPE_VIDEO
)
if
(
ost
->
st
->
codec
.
codec_type
==
CODEC_TYPE_VIDEO
)
opts
=
(
double
)
ost
->
sync_opts
*
ost
->
st
->
codec
.
frame_rate_base
/
ost
->
st
->
codec
.
frame_rate
;
pts
=
(
double
)
ost
->
sync_opts
*
ost
->
st
->
codec
.
frame_rate_base
/
ost
->
st
->
codec
.
frame_rate
;
else
else
opts
=
(
double
)
ost
->
st
->
pts
.
val
*
ost
->
st
->
time_base
.
num
/
ost
->
st
->
time_base
.
den
;
pts
=
(
double
)
ost
->
st
->
pts
.
val
*
ost
->
st
->
time_base
.
num
/
ost
->
st
->
time_base
.
den
;
ipts
=
(
double
)
ist
->
pts
;
}
else
{
if
(
!
file_table
[
ist
->
file_index
].
eof_reached
){
pts
=
(
double
)
ist
->
pts
;
if
(
ipts
<
ipts_min
)
{
}
ipts_min
=
ipts
;
if
(
!
file_table
[
ist
->
file_index
].
eof_reached
&&
if
(
input_sync
)
file_index
=
ist
->
file_index
;
pts
<
pts_min
)
{
}
pts_min
=
pts
;
if
(
opts
<
opts_min
)
{
file_index
=
ist
->
file_index
;
opts_min
=
opts
;
if
(
!
input_sync
)
file_index
=
ist
->
file_index
;
}
}
}
}
}
/* if none, if is finished */
/* if none, if is finished */
...
@@ -1734,7 +1736,7 @@ static int av_encode(AVFormatContext **output_files,
...
@@ -1734,7 +1736,7 @@ static int av_encode(AVFormatContext **output_files,
}
}
/* finish if recording time exhausted */
/* finish if recording time exhausted */
if
(
recording_time
>
0
&&
pts_min
>=
(
recording_time
/
1000000
.
0
))
if
(
recording_time
>
0
&&
o
pts_min
>=
(
recording_time
/
1000000
.
0
))
break
;
break
;
/* read a frame from it and output it in the fifo */
/* read a frame from it and output it in the fifo */
...
...
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