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
9694695a
Commit
9694695a
authored
Jul 29, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: fix probe mime version checks
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
80a3a661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
avformat.h
libavformat/avformat.h
+1
-1
format.c
libavformat/format.c
+3
-3
No files found.
libavformat/avformat.h
View file @
9694695a
...
@@ -393,7 +393,7 @@ typedef struct AVProbeData {
...
@@ -393,7 +393,7 @@ typedef struct AVProbeData {
const
char
*
filename
;
const
char
*
filename
;
unsigned
char
*
buf
;
/**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */
unsigned
char
*
buf
;
/**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */
int
buf_size
;
/**< Size of buf except extra allocated bytes */
int
buf_size
;
/**< Size of buf except extra allocated bytes */
#if
def
FF_API_PROBE_MIME
#if FF_API_PROBE_MIME
uint8_t
*
mime_type
;
/**< mime_type, when known. */
uint8_t
*
mime_type
;
/**< mime_type, when known. */
#endif
#endif
}
AVProbeData
;
}
AVProbeData
;
...
...
libavformat/format.c
View file @
9694695a
...
@@ -214,7 +214,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
...
@@ -214,7 +214,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
if
(
av_match_ext
(
lpd
.
filename
,
fmt1
->
extensions
))
if
(
av_match_ext
(
lpd
.
filename
,
fmt1
->
extensions
))
score
=
AVPROBE_SCORE_EXTENSION
;
score
=
AVPROBE_SCORE_EXTENSION
;
}
}
#if
def
FF_API_PROBE_MIME
#if FF_API_PROBE_MIME
if
(
av_match_name
(
lpd
.
mime_type
,
fmt1
->
mime_type
))
if
(
av_match_name
(
lpd
.
mime_type
,
fmt1
->
mime_type
))
score
=
FFMAX
(
score
,
AVPROBE_SCORE_EXTENSION
);
score
=
FFMAX
(
score
,
AVPROBE_SCORE_EXTENSION
);
#endif
#endif
...
@@ -269,7 +269,7 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
...
@@ -269,7 +269,7 @@ int av_probe_input_buffer2(AVIOContext *pb, AVInputFormat **fmt,
if
(
offset
>=
max_probe_size
)
if
(
offset
>=
max_probe_size
)
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
#if
def
FF_API_PROBE_MIME
#if FF_API_PROBE_MIME
if
(
pb
->
av_class
)
if
(
pb
->
av_class
)
av_opt_get
(
pb
,
"mime_type"
,
AV_OPT_SEARCH_CHILDREN
,
&
pd
.
mime_type
);
av_opt_get
(
pb
,
"mime_type"
,
AV_OPT_SEARCH_CHILDREN
,
&
pd
.
mime_type
);
#endif
#endif
...
@@ -336,7 +336,7 @@ fail:
...
@@ -336,7 +336,7 @@ fail:
if
(
ret
>=
0
)
if
(
ret
>=
0
)
ret
=
ffio_rewind_with_probe_data
(
pb
,
&
buf
,
buf_offset
);
ret
=
ffio_rewind_with_probe_data
(
pb
,
&
buf
,
buf_offset
);
#if
def
FF_API_PROBE_MIME
#if FF_API_PROBE_MIME
av_free
(
pd
.
mime_type
);
av_free
(
pd
.
mime_type
);
#endif
#endif
return
ret
<
0
?
ret
:
score
;
return
ret
<
0
?
ret
:
score
;
...
...
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