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
91e59fea
Commit
91e59fea
authored
Aug 11, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add avcodec_descriptor_get_by_name().
parent
0a0f19b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
avcodec.h
libavcodec/avcodec.h
+6
-0
codec_desc.c
libavcodec/codec_desc.c
+13
-0
No files found.
libavcodec/avcodec.h
View file @
91e59fea
...
...
@@ -4548,6 +4548,12 @@ const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
*/
const
AVCodecDescriptor
*
avcodec_descriptor_next
(
const
AVCodecDescriptor
*
prev
);
/**
* @return codec descriptor with the given name or NULL if no such descriptor
* exists.
*/
const
AVCodecDescriptor
*
avcodec_descriptor_get_by_name
(
const
char
*
name
);
/**
* @}
*/
...
...
libavcodec/codec_desc.c
View file @
91e59fea
...
...
@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string.h>
#include "avcodec.h"
#include "libavutil/common.h"
...
...
@@ -1939,3 +1941,14 @@ const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev)
return
prev
+
1
;
return
NULL
;
}
const
AVCodecDescriptor
*
avcodec_descriptor_get_by_name
(
const
char
*
name
)
{
const
AVCodecDescriptor
*
desc
=
NULL
;
while
((
desc
=
avcodec_descriptor_next
(
desc
)))
{
if
(
!
strcmp
(
desc
->
name
,
name
))
return
desc
;
}
return
NULL
;
}
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