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
e971eef8
Commit
e971eef8
authored
Nov 09, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set -scan_all_pmts 1 in ffmpeg, ffplay and ffprobe if not set by user.
Fixes ticket #3762.
parent
4e179436
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
ffmpeg_opt.c
ffmpeg_opt.c
+7
-0
ffplay.c
ffplay.c
+8
-0
ffprobe.c
ffprobe.c
+7
-0
No files found.
ffmpeg_opt.c
View file @
e971eef8
...
...
@@ -794,6 +794,7 @@ static int open_input_file(OptionsContext *o, const char *filename)
char
*
video_codec_name
=
NULL
;
char
*
audio_codec_name
=
NULL
;
char
*
subtitle_codec_name
=
NULL
;
int
scan_all_pmts_set
=
0
;
if
(
o
->
format
)
{
if
(
!
(
file_iformat
=
av_find_input_format
(
o
->
format
)))
{
...
...
@@ -864,12 +865,18 @@ static int open_input_file(OptionsContext *o, const char *filename)
ic
->
flags
|=
AVFMT_FLAG_NONBLOCK
;
ic
->
interrupt_callback
=
int_cb
;
if
(
!
av_dict_get
(
o
->
g
->
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
))
{
av_dict_set
(
&
o
->
g
->
format_opts
,
"scan_all_pmts"
,
"1"
,
AV_DICT_DONT_OVERWRITE
);
scan_all_pmts_set
=
1
;
}
/* open the input file with generic avformat function */
err
=
avformat_open_input
(
&
ic
,
filename
,
file_iformat
,
&
o
->
g
->
format_opts
);
if
(
err
<
0
)
{
print_error
(
filename
,
err
);
exit_program
(
1
);
}
if
(
scan_all_pmts_set
)
av_dict_set
(
&
o
->
g
->
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
);
remove_avoptions
(
&
o
->
g
->
format_opts
,
o
->
g
->
codec_opts
);
assert_avoptions
(
o
->
g
->
format_opts
);
...
...
ffplay.c
View file @
e971eef8
...
...
@@ -2890,6 +2890,7 @@ static int read_thread(void *arg)
AVDictionary
**
opts
;
int
orig_nb_streams
;
SDL_mutex
*
wait_mutex
=
SDL_CreateMutex
();
int
scan_all_pmts_set
=
0
;
memset
(
st_index
,
-
1
,
sizeof
(
st_index
));
is
->
last_video_stream
=
is
->
video_stream
=
-
1
;
...
...
@@ -2899,12 +2900,19 @@ static int read_thread(void *arg)
ic
=
avformat_alloc_context
();
ic
->
interrupt_callback
.
callback
=
decode_interrupt_cb
;
ic
->
interrupt_callback
.
opaque
=
is
;
if
(
!
av_dict_get
(
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
))
{
av_dict_set
(
&
format_opts
,
"scan_all_pmts"
,
"1"
,
AV_DICT_DONT_OVERWRITE
);
scan_all_pmts_set
=
1
;
}
err
=
avformat_open_input
(
&
ic
,
is
->
filename
,
is
->
iformat
,
&
format_opts
);
if
(
err
<
0
)
{
print_error
(
is
->
filename
,
err
);
ret
=
-
1
;
goto
fail
;
}
if
(
scan_all_pmts_set
)
av_dict_set
(
&
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
);
if
((
t
=
av_dict_get
(
format_opts
,
""
,
NULL
,
AV_DICT_IGNORE_SUFFIX
)))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Option %s not found.
\n
"
,
t
->
key
);
ret
=
AVERROR_OPTION_NOT_FOUND
;
...
...
ffprobe.c
View file @
e971eef8
...
...
@@ -2386,12 +2386,19 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVFormatContext
*
fmt_ctx
=
NULL
;
AVDictionaryEntry
*
t
;
AVDictionary
**
opts
;
int
scan_all_pmts_set
=
0
;
if
(
!
av_dict_get
(
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
))
{
av_dict_set
(
&
format_opts
,
"scan_all_pmts"
,
"1"
,
AV_DICT_DONT_OVERWRITE
);
scan_all_pmts_set
=
1
;
}
if
((
err
=
avformat_open_input
(
&
fmt_ctx
,
filename
,
iformat
,
&
format_opts
))
<
0
)
{
print_error
(
filename
,
err
);
return
err
;
}
if
(
scan_all_pmts_set
)
av_dict_set
(
&
format_opts
,
"scan_all_pmts"
,
NULL
,
AV_DICT_MATCH_CASE
);
if
((
t
=
av_dict_get
(
format_opts
,
""
,
NULL
,
AV_DICT_IGNORE_SUFFIX
)))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Option %s not found.
\n
"
,
t
->
key
);
return
AVERROR_OPTION_NOT_FOUND
;
...
...
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