Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
9777ba33
Commit
9777ba33
authored
Sep 22, 2016
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/utils: avoid using marked decoders for probing
Reviewed-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
30d3e36a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
utils.c
libavformat/utils.c
+18
-1
No files found.
libavformat/utils.c
View file @
9777ba33
...
@@ -188,6 +188,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
...
@@ -188,6 +188,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
static
const
AVCodec
*
find_probe_decoder
(
AVFormatContext
*
s
,
const
AVStream
*
st
,
enum
AVCodecID
codec_id
)
static
const
AVCodec
*
find_probe_decoder
(
AVFormatContext
*
s
,
const
AVStream
*
st
,
enum
AVCodecID
codec_id
)
{
{
const
AVCodec
*
codec
;
#if CONFIG_H264_DECODER
#if CONFIG_H264_DECODER
/* Other parts of the code assume this decoder to be used for h264,
/* Other parts of the code assume this decoder to be used for h264,
* so force it if possible. */
* so force it if possible. */
...
@@ -195,7 +197,22 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
...
@@ -195,7 +197,22 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
return
avcodec_find_decoder_by_name
(
"h264"
);
return
avcodec_find_decoder_by_name
(
"h264"
);
#endif
#endif
return
find_decoder
(
s
,
st
,
codec_id
);
codec
=
find_decoder
(
s
,
st
,
codec_id
);
if
(
!
codec
)
return
NULL
;
if
(
codec
->
capabilities
&
AV_CODEC_CAP_AVOID_PROBING
)
{
const
AVCodec
*
probe_codec
=
NULL
;
while
(
probe_codec
=
av_codec_next
(
probe_codec
))
{
if
(
probe_codec
->
id
==
codec_id
&&
av_codec_is_decoder
(
probe_codec
)
&&
!
(
probe_codec
->
capabilities
&
(
AV_CODEC_CAP_AVOID_PROBING
|
AV_CODEC_CAP_EXPERIMENTAL
)))
{
return
probe_codec
;
}
}
}
return
codec
;
}
}
int
av_format_get_probe_score
(
const
AVFormatContext
*
s
)
int
av_format_get_probe_score
(
const
AVFormatContext
*
s
)
...
...
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