Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1d1d8b8d
Commit
1d1d8b8d
authored
Apr 15, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcommon: add an helper to parse private options
parent
f5bc59c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
modules/codec/avcodec/avcommon.h
modules/codec/avcodec/avcommon.h
+27
-0
No files found.
modules/codec/avcodec/avcommon.h
View file @
1d1d8b8d
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#endif
#endif
#include <vlc_avcodec.h>
#include <vlc_avcodec.h>
#include <vlc_configuration.h>
#include <vlc_variables.h>
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
# include <libavformat/avformat.h>
# include <libavformat/avformat.h>
...
@@ -53,3 +55,28 @@ static inline void vlc_init_avcodec(void)
...
@@ -53,3 +55,28 @@ static inline void vlc_init_avcodec(void)
vlc_avcodec_unlock
();
vlc_avcodec_unlock
();
}
}
#endif
#endif
#ifdef HAVE_LIBAVUTIL_AVUTIL_H
# include <libavutil/avutil.h>
# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 51, 7, 0 )
# include <libavutil/dict.h>
#define AV_OPTIONS_TEXT "FFmpeg advanced options."
#define AV_OPTIONS_LONGTEXT "FFmpeg advanced options, in the form {opt=val,opt2=val2} ."
static
inline
AVDictionary
*
vlc_av_get_options
(
const
char
*
psz_opts
)
{
AVDictionary
*
options
=
NULL
;
config_chain_t
*
cfg
;
config_ChainParseOptions
(
&
cfg
,
psz_opts
);
while
(
cfg
)
{
config_chain_t
*
next
=
cfg
->
p_next
;
av_dict_set
(
&
options
,
cfg
->
psz_name
,
cfg
->
psz_value
,
AV_DICT_DONT_STRDUP_KEY
|
AV_DICT_DONT_STRDUP_VAL
);
free
(
cfg
);
cfg
=
next
;
}
return
options
;
}
# endif
#endif
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