Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Steve Lhomme
VLC
Commits
667c3a73
Commit
667c3a73
authored
Apr 11, 2017
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: vlc_av_get_options: Append to a potentially existing dict
parent
9a02992a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
11 deletions
+9
-11
modules/access/avio.c
modules/access/avio.c
+2
-2
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.c
+1
-1
modules/codec/avcodec/avcommon.h
modules/codec/avcodec/avcommon.h
+2
-4
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+1
-1
modules/codec/avcodec/subtitle.c
modules/codec/avcodec/subtitle.c
+1
-1
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+1
-1
modules/demux/avformat/mux.c
modules/demux/avformat/mux.c
+1
-1
No files found.
modules/access/avio.c
View file @
667c3a73
...
...
@@ -159,7 +159,7 @@ int OpenAvio(vlc_object_t *object)
AVDictionary
*
options
=
NULL
;
char
*
psz_opts
=
var_InheritString
(
access
,
"avio-options"
);
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
ret
=
avio_open2
(
&
sys
->
context
,
url
,
AVIO_FLAG_READ
,
&
cb
,
&
options
);
...
...
@@ -239,7 +239,7 @@ int OutOpenAvio(vlc_object_t *object)
AVDictionary
*
options
=
NULL
;
char
*
psz_opts
=
var_InheritString
(
access
,
"sout-avio-options"
);
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
ret
=
avio_open2
(
&
sys
->
context
,
access
->
psz_path
,
AVIO_FLAG_WRITE
,
...
...
modules/codec/avcodec/avcodec.c
View file @
667c3a73
...
...
@@ -366,7 +366,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec )
int
ret
;
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
...
...
modules/codec/avcodec/avcommon.h
View file @
667c3a73
...
...
@@ -45,20 +45,18 @@
#define AV_OPTIONS_TEXT "Advanced options"
#define AV_OPTIONS_LONGTEXT "Advanced options, in the form {opt=val,opt2=val2}."
static
inline
AVDictionary
*
vlc_av_get_options
(
const
char
*
psz_opts
)
static
inline
void
vlc_av_get_options
(
const
char
*
psz_opts
,
AVDictionary
**
pp_dict
)
{
AVDictionary
*
options
=
NULL
;
config_chain_t
*
cfg
=
NULL
;
config_ChainParseOptions
(
&
cfg
,
psz_opts
);
while
(
cfg
)
{
config_chain_t
*
next
=
cfg
->
p_next
;
av_dict_set
(
&
options
,
cfg
->
psz_name
,
cfg
->
psz_value
,
0
);
av_dict_set
(
pp_dict
,
cfg
->
psz_name
,
cfg
->
psz_value
,
0
);
free
(
cfg
->
psz_name
);
free
(
cfg
->
psz_value
);
free
(
cfg
);
cfg
=
next
;
}
return
options
;
}
static
inline
void
vlc_init_avutil
(
vlc_object_t
*
obj
)
...
...
modules/codec/avcodec/encoder.c
View file @
667c3a73
...
...
@@ -915,7 +915,7 @@ int OpenEncoder( vlc_object_t *p_this )
char
*
psz_opts
=
var_InheritString
(
p_enc
,
ENC_CFG_PREFIX
"options"
);
AVDictionary
*
options
=
NULL
;
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
...
...
modules/codec/avcodec/subtitle.c
View file @
667c3a73
...
...
@@ -90,7 +90,7 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
char
*
psz_opts
=
var_InheritString
(
dec
,
"avcodec-options"
);
AVDictionary
*
options
=
NULL
;
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
...
...
modules/demux/avformat/demux.c
View file @
667c3a73
...
...
@@ -337,7 +337,7 @@ int OpenDemux( vlc_object_t *p_this )
for
(
unsigned
i
=
1
;
i
<
nb_streams
;
i
++
)
options
[
i
]
=
NULL
;
if
(
psz_opts
)
{
options
[
0
]
=
vlc_av_get_options
(
psz_opts
);
vlc_av_get_options
(
psz_opts
,
&
options
[
0
]
);
for
(
unsigned
i
=
1
;
i
<
nb_streams
;
i
++
)
{
av_dict_copy
(
&
options
[
i
],
options
[
0
],
0
);
}
...
...
modules/demux/avformat/mux.c
View file @
667c3a73
...
...
@@ -404,7 +404,7 @@ static int Mux( sout_mux_t *p_mux )
char
*
psz_opts
=
var_GetNonEmptyString
(
p_mux
,
"sout-avformat-options"
);
AVDictionary
*
options
=
NULL
;
if
(
psz_opts
)
{
options
=
vlc_av_get_options
(
psz_opt
s
);
vlc_av_get_options
(
psz_opts
,
&
option
s
);
free
(
psz_opts
);
}
av_dict_set
(
&
p_sys
->
oc
->
metadata
,
"encoding_tool"
,
"VLC "
VERSION
,
0
);
...
...
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