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
e3d95b54
Commit
e3d95b54
authored
Dec 09, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
probe: belive protocol content type if set and avoid lengthly probing.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
76d851b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
utils.c
libavformat/utils.c
+5
-0
No files found.
libavformat/utils.c
View file @
e3d95b54
...
...
@@ -413,6 +413,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
{
AVProbeData
pd
=
{
filename
?
filename
:
""
,
NULL
,
-
offset
};
unsigned
char
*
buf
=
NULL
;
uint8_t
*
demuxer_name
;
int
ret
=
0
,
probe_size
,
buf_offset
=
0
;
if
(
!
max_probe_size
)
{
...
...
@@ -427,6 +428,10 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
return
AVERROR
(
EINVAL
);
}
if
(
!*
fmt
&&
pb
&&
pb
->
av_class
&&
av_opt_get
(
pb
,
"demuxer"
,
AV_OPT_SEARCH_CHILDREN
,
&
demuxer_name
)
>=
0
&&
demuxer_name
)
{
*
fmt
=
av_find_input_format
(
demuxer_name
);
}
for
(
probe_size
=
PROBE_BUF_MIN
;
probe_size
<=
max_probe_size
&&
!*
fmt
;
probe_size
=
FFMIN
(
probe_size
<<
1
,
FFMAX
(
max_probe_size
,
probe_size
+
1
)))
{
int
score
=
probe_size
<
max_probe_size
?
AVPROBE_SCORE_RETRY
:
0
;
...
...
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