Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a4aa20fb
Commit
a4aa20fb
authored
12 years ago
by
Nathan Caldwell
Committed by
Luca Barbato
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
avcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
620345f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/utils.c
+9
-10
9 additions, 10 deletions
libavcodec/utils.c
with
9 additions
and
10 deletions
libavcodec/utils.c
+
9
−
10
View file @
a4aa20fb
...
@@ -1490,12 +1490,13 @@ av_cold int avcodec_close(AVCodecContext *avctx)
...
@@ -1490,12 +1490,13 @@ av_cold int avcodec_close(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
AVCodec
*
avcodec_
find_enc
o
de
r
(
enum
AVCodecID
id
)
static
AVCodec
*
find_encde
c
(
enum
AVCodecID
id
,
int
encoder
)
{
{
AVCodec
*
p
,
*
experimental
=
NULL
;
AVCodec
*
p
,
*
experimental
=
NULL
;
p
=
first_avcodec
;
p
=
first_avcodec
;
while
(
p
)
{
while
(
p
)
{
if
(
av_codec_is_encoder
(
p
)
&&
p
->
id
==
id
)
{
if
((
encoder
?
av_codec_is_encoder
(
p
)
:
av_codec_is_decoder
(
p
))
&&
p
->
id
==
id
)
{
if
(
p
->
capabilities
&
CODEC_CAP_EXPERIMENTAL
&&
!
experimental
)
{
if
(
p
->
capabilities
&
CODEC_CAP_EXPERIMENTAL
&&
!
experimental
)
{
experimental
=
p
;
experimental
=
p
;
}
else
}
else
...
@@ -1506,6 +1507,11 @@ AVCodec *avcodec_find_encoder(enum AVCodecID id)
...
@@ -1506,6 +1507,11 @@ AVCodec *avcodec_find_encoder(enum AVCodecID id)
return
experimental
;
return
experimental
;
}
}
AVCodec
*
avcodec_find_encoder
(
enum
AVCodecID
id
)
{
return
find_encdec
(
id
,
1
);
}
AVCodec
*
avcodec_find_encoder_by_name
(
const
char
*
name
)
AVCodec
*
avcodec_find_encoder_by_name
(
const
char
*
name
)
{
{
AVCodec
*
p
;
AVCodec
*
p
;
...
@@ -1522,14 +1528,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
...
@@ -1522,14 +1528,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
AVCodec
*
avcodec_find_decoder
(
enum
AVCodecID
id
)
AVCodec
*
avcodec_find_decoder
(
enum
AVCodecID
id
)
{
{
AVCodec
*
p
;
return
find_encdec
(
id
,
0
);
p
=
first_avcodec
;
while
(
p
)
{
if
(
av_codec_is_decoder
(
p
)
&&
p
->
id
==
id
)
return
p
;
p
=
p
->
next
;
}
return
NULL
;
}
}
AVCodec
*
avcodec_find_decoder_by_name
(
const
char
*
name
)
AVCodec
*
avcodec_find_decoder_by_name
(
const
char
*
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment