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
4d3c5d3b
Commit
4d3c5d3b
authored
Mar 30, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show "Estimating duration from bitrate" warning if no duration was estimated.
parent
65340c97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
utils.c
libavformat/utils.c
+4
-2
No files found.
libavformat/utils.c
View file @
4d3c5d3b
...
...
@@ -2304,7 +2304,7 @@ static void fill_all_stream_timings(AVFormatContext *ic)
static
void
estimate_timings_from_bit_rate
(
AVFormatContext
*
ic
)
{
int64_t
filesize
,
duration
;
int
bit_rate
,
i
;
int
bit_rate
,
i
,
show_warning
=
0
;
AVStream
*
st
;
/* if bit_rate is already set, we believe it */
...
...
@@ -2329,10 +2329,13 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
&&
st
->
duration
==
AV_NOPTS_VALUE
)
{
duration
=
av_rescale
(
8
*
filesize
,
st
->
time_base
.
den
,
ic
->
bit_rate
*
(
int64_t
)
st
->
time_base
.
num
);
st
->
duration
=
duration
;
show_warning
=
1
;
}
}
}
}
if
(
show_warning
)
av_log
(
ic
,
AV_LOG_WARNING
,
"Estimating duration from bitrate, this may be inaccurate
\n
"
);
}
#define DURATION_MAX_READ_SIZE 250000LL
...
...
@@ -2440,7 +2443,6 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
fill_all_stream_timings
(
ic
);
ic
->
duration_estimation_method
=
AVFMT_DURATION_FROM_STREAM
;
}
else
{
av_log
(
ic
,
AV_LOG_WARNING
,
"Estimating duration from bitrate, this may be inaccurate
\n
"
);
/* less precise: use bitrate info */
estimate_timings_from_bit_rate
(
ic
);
ic
->
duration_estimation_method
=
AVFMT_DURATION_FROM_BITRATE
;
...
...
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