Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
ffmpeg2theora
Commits
849072b3
Commit
849072b3
authored
Jul 31, 2009
by
Jan Gerber
Browse files
output right duration if start or end time are specified
parent
6a3b7d3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ffmpeg2theora.c
View file @
849072b3
...
...
@@ -2474,7 +2474,10 @@ int main(int argc, char **argv) {
return
(
1
);
}
if
(
convert
->
context
->
duration
!=
AV_NOPTS_VALUE
)
{
info
.
duration
=
(
double
)
convert
->
context
->
duration
/
AV_TIME_BASE
;
info
.
duration
=
(
double
)
convert
->
context
->
duration
/
AV_TIME_BASE
-
\
convert
->
start_time
;
if
(
convert
->
end_time
)
info
.
duration
=
convert
->
end_time
-
convert
->
start_time
;
}
for
(
info
.
passno
=
(
info
.
twopass
==
3
?
1
:
info
.
twopass
);
info
.
passno
<=
(
info
.
twopass
==
3
?
2
:
info
.
twopass
);
info
.
passno
++
){
ff2theora_output
(
convert
);
...
...
src/theorautils.c
View file @
849072b3
...
...
@@ -720,7 +720,7 @@ static void print_stats(oggmux_info *info, double timebase) {
last
=
timebase
;
if
(
info
->
frontend
)
{
fprintf
(
info
->
frontend
,
"{
\"
duration
\"
: %lf,
\"
position
\"
: %.02lf,
\"
remaining
\"
: %.02lf}
\n
"
,
(
double
)
info
->
duration
,
info
->
duration
,
timebase
,
remaining
);
...
...
@@ -738,7 +738,7 @@ static void print_stats(oggmux_info *info, double timebase) {
last
=
timebase
;
if
(
info
->
frontend
)
{
fprintf
(
info
->
frontend
,
"{
\"
duration
\"
: %lf,
\"
position
\"
: %.02lf,
\"
audio_kbps
\"
: %d,
\"
video_kbps
\"
: %d,
\"
remaining
\"
: %.02lf}
\n
"
,
(
double
)
info
->
duration
,
info
->
duration
,
timebase
,
info
->
akbps
,
info
->
vkbps
,
remaining
...
...
Write
Preview
Supports
Markdown
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