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
44758b4d
Commit
44758b4d
authored
Oct 20, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: add support for libswresample options
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
04de0e04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
ffplay.c
ffplay.c
+8
-0
No files found.
ffplay.c
View file @
44758b4d
...
...
@@ -1833,6 +1833,8 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
int64_t
channel_layouts
[
2
]
=
{
0
,
-
1
};
int
channels
[
2
]
=
{
0
,
-
1
};
AVFilterContext
*
filt_asrc
=
NULL
,
*
filt_asink
=
NULL
;
char
aresample_swr_opts
[
512
]
=
""
;
AVDictionaryEntry
*
e
=
NULL
;
char
asrc_args
[
256
];
int
ret
;
...
...
@@ -1840,6 +1842,12 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
if
(
!
(
is
->
agraph
=
avfilter_graph_alloc
()))
return
AVERROR
(
ENOMEM
);
while
((
e
=
av_dict_get
(
swr_opts
,
""
,
e
,
AV_DICT_IGNORE_SUFFIX
)))
av_strlcatf
(
aresample_swr_opts
,
sizeof
(
aresample_swr_opts
),
"%s=%s:"
,
e
->
key
,
e
->
value
);
if
(
strlen
(
aresample_swr_opts
))
aresample_swr_opts
[
strlen
(
aresample_swr_opts
)
-
1
]
=
'\0'
;
av_opt_set
(
is
->
agraph
,
"aresample_swr_opts"
,
aresample_swr_opts
,
0
);
ret
=
snprintf
(
asrc_args
,
sizeof
(
asrc_args
),
"sample_rate=%d:sample_fmt=%s:channels=%d:time_base=%d/%d"
,
is
->
audio_filter_src
.
freq
,
av_get_sample_fmt_name
(
is
->
audio_filter_src
.
fmt
),
...
...
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