Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a5d58fea
Commit
a5d58fea
authored
Sep 26, 2015
by
wm4
Committed by
Anton Khirnov
Sep 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: reimplement avcodec_get_type() using codec descriptors
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
b10b6ac7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
codec_desc.c
libavcodec/codec_desc.c
+6
-0
utils.c
libavcodec/utils.c
+0
-14
No files found.
libavcodec/codec_desc.c
View file @
a5d58fea
...
@@ -2435,3 +2435,9 @@ const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name)
...
@@ -2435,3 +2435,9 @@ const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name)
return
desc
;
return
desc
;
return
NULL
;
return
NULL
;
}
}
enum
AVMediaType
avcodec_get_type
(
enum
AVCodecID
codec_id
)
{
const
AVCodecDescriptor
*
desc
=
avcodec_descriptor_get
(
codec_id
);
return
desc
?
desc
->
type
:
AVMEDIA_TYPE_UNKNOWN
;
}
libavcodec/utils.c
View file @
a5d58fea
...
@@ -2320,20 +2320,6 @@ void ff_thread_await_progress(ThreadFrame *f, int progress, int field)
...
@@ -2320,20 +2320,6 @@ void ff_thread_await_progress(ThreadFrame *f, int progress, int field)
#endif
#endif
enum
AVMediaType
avcodec_get_type
(
enum
AVCodecID
codec_id
)
{
if
(
codec_id
<=
AV_CODEC_ID_NONE
)
return
AVMEDIA_TYPE_UNKNOWN
;
else
if
(
codec_id
<
AV_CODEC_ID_FIRST_AUDIO
)
return
AVMEDIA_TYPE_VIDEO
;
else
if
(
codec_id
<
AV_CODEC_ID_FIRST_SUBTITLE
)
return
AVMEDIA_TYPE_AUDIO
;
else
if
(
codec_id
<
AV_CODEC_ID_FIRST_UNKNOWN
)
return
AVMEDIA_TYPE_SUBTITLE
;
return
AVMEDIA_TYPE_UNKNOWN
;
}
int
avcodec_is_open
(
AVCodecContext
*
s
)
int
avcodec_is_open
(
AVCodecContext
*
s
)
{
{
return
!!
s
->
internal
;
return
!!
s
->
internal
;
...
...
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