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
fa119522
Commit
fa119522
authored
Apr 30, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FFMPEG: support demuxer specific options.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ffdc49df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
cmdutils.c
cmdutils.c
+10
-0
ffmpeg.c
ffmpeg.c
+7
-1
No files found.
cmdutils.c
View file @
fa119522
...
...
@@ -297,6 +297,7 @@ int opt_default(const char *opt, const char *arg){
int
opt_types
[]
=
{
AV_OPT_FLAG_VIDEO_PARAM
,
AV_OPT_FLAG_AUDIO_PARAM
,
0
,
AV_OPT_FLAG_SUBTITLE_PARAM
,
0
};
AVCodec
*
p
=
NULL
;
AVOutputFormat
*
oformat
=
NULL
;
AVInputFormat
*
iformat
=
NULL
;
while
((
p
=
av_codec_next
(
p
)))
{
AVClass
*
c
=
p
->
priv_class
;
...
...
@@ -312,6 +313,13 @@ int opt_default(const char *opt, const char *arg){
}
if
(
oformat
)
goto
out
;
while
((
iformat
=
av_iformat_next
(
iformat
)))
{
const
AVClass
*
c
=
iformat
->
priv_class
;
if
(
c
&&
av_find_opt
(
&
c
,
opt
,
NULL
,
0
,
0
))
break
;
}
if
(
iformat
)
goto
out
;
for
(
type
=
0
;
*
avcodec_opts
&&
type
<
AVMEDIA_TYPE_NB
&&
ret
>=
0
;
type
++
){
const
AVOption
*
o2
=
av_find_opt
(
avcodec_opts
[
0
],
opt
,
NULL
,
opt_types
[
type
],
opt_types
[
type
]);
...
...
@@ -415,6 +423,8 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec)
AVFormatContext
*
avctx
=
ctx
;
if
(
avctx
->
oformat
&&
avctx
->
oformat
->
priv_class
)
{
priv_ctx
=
avctx
->
priv_data
;
}
else
if
(
avctx
->
iformat
&&
avctx
->
iformat
->
priv_class
)
{
priv_ctx
=
avctx
->
priv_data
;
}
}
...
...
ffmpeg.c
View file @
fa119522
...
...
@@ -3258,10 +3258,16 @@ static void opt_input_file(const char *filename)
ic
->
subtitle_codec_id
=
find_codec_or_die
(
subtitle_codec_name
,
AVMEDIA_TYPE_SUBTITLE
,
0
,
avcodec_opts
[
AVMEDIA_TYPE_SUBTITLE
]
->
strict_std_compliance
);
ic
->
flags
|=
AVFMT_FLAG_NONBLOCK
;
ic
->
flags
|=
AVFMT_FLAG_NONBLOCK
|
AVFMT_FLAG_PRIV_OPT
;
/* open the input file with generic libav function */
err
=
av_open_input_file
(
&
ic
,
filename
,
file_iformat
,
0
,
ap
);
if
(
err
>=
0
){
set_context_opts
(
ic
,
avformat_opts
,
AV_OPT_FLAG_DECODING_PARAM
,
NULL
);
err
=
av_demuxer_open
(
ic
,
ap
);
if
(
err
<
0
)
avformat_free_context
(
ic
);
}
if
(
err
<
0
)
{
print_error
(
filename
,
err
);
ffmpeg_exit
(
1
);
...
...
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