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
efd34918
Commit
efd34918
authored
Jun 28, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: remove commented out cruft in avformat_find_stream_info()
parent
c4ef6a3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
utils.c
libavformat/utils.c
+1
-7
No files found.
libavformat/utils.c
View file @
efd34918
...
@@ -2404,8 +2404,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
...
@@ -2404,8 +2404,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
int64_t
duration
=
pkt
->
dts
-
last
;
int64_t
duration
=
pkt
->
dts
-
last
;
double
dur
=
duration
*
av_q2d
(
st
->
time_base
);
double
dur
=
duration
*
av_q2d
(
st
->
time_base
);
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// av_log(NULL, AV_LOG_ERROR, "%f\n", dur);
if
(
st
->
info
->
duration_count
<
2
)
if
(
st
->
info
->
duration_count
<
2
)
memset
(
st
->
info
->
duration_error
,
0
,
sizeof
(
st
->
info
->
duration_error
));
memset
(
st
->
info
->
duration_error
,
0
,
sizeof
(
st
->
info
->
duration_error
));
for
(
i
=
1
;
i
<
FF_ARRAY_ELEMS
(
st
->
info
->
duration_error
);
i
++
)
{
for
(
i
=
1
;
i
<
FF_ARRAY_ELEMS
(
st
->
info
->
duration_error
);
i
++
)
{
...
@@ -2467,17 +2465,13 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
...
@@ -2467,17 +2465,13 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if
(
tb_unreliable
(
st
->
codec
)
&&
st
->
info
->
duration_count
>
15
&&
st
->
info
->
duration_gcd
>
1
&&
!
st
->
r_frame_rate
.
num
)
if
(
tb_unreliable
(
st
->
codec
)
&&
st
->
info
->
duration_count
>
15
&&
st
->
info
->
duration_gcd
>
1
&&
!
st
->
r_frame_rate
.
num
)
av_reduce
(
&
st
->
r_frame_rate
.
num
,
&
st
->
r_frame_rate
.
den
,
st
->
time_base
.
den
,
st
->
time_base
.
num
*
st
->
info
->
duration_gcd
,
INT_MAX
);
av_reduce
(
&
st
->
r_frame_rate
.
num
,
&
st
->
r_frame_rate
.
den
,
st
->
time_base
.
den
,
st
->
time_base
.
num
*
st
->
info
->
duration_gcd
,
INT_MAX
);
if
(
st
->
info
->
duration_count
&&
!
st
->
r_frame_rate
.
num
if
(
st
->
info
->
duration_count
&&
!
st
->
r_frame_rate
.
num
&&
tb_unreliable
(
st
->
codec
)
/*&&
&&
tb_unreliable
(
st
->
codec
))
{
//FIXME we should not special-case MPEG-2, but this needs testing with non-MPEG-2 ...
st->time_base.num*duration_sum[i]/st->info->duration_count*101LL > st->time_base.den*/
){
int
num
=
0
;
int
num
=
0
;
double
best_error
=
2
*
av_q2d
(
st
->
time_base
);
double
best_error
=
2
*
av_q2d
(
st
->
time_base
);
best_error
=
best_error
*
best_error
*
st
->
info
->
duration_count
*
1000
*
12
*
30
;
best_error
=
best_error
*
best_error
*
st
->
info
->
duration_count
*
1000
*
12
*
30
;
for
(
j
=
1
;
j
<
FF_ARRAY_ELEMS
(
st
->
info
->
duration_error
);
j
++
)
{
for
(
j
=
1
;
j
<
FF_ARRAY_ELEMS
(
st
->
info
->
duration_error
);
j
++
)
{
double
error
=
st
->
info
->
duration_error
[
j
]
*
get_std_framerate
(
j
);
double
error
=
st
->
info
->
duration_error
[
j
]
*
get_std_framerate
(
j
);
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) / 12.0/1001, error);
if
(
error
<
best_error
){
if
(
error
<
best_error
){
best_error
=
error
;
best_error
=
error
;
num
=
get_std_framerate
(
j
);
num
=
get_std_framerate
(
j
);
...
...
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