Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d8e075b1
Commit
d8e075b1
authored
May 19, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use AUTO_INSERT_FILTER() for -async option.
parent
2416cd40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
ffmpeg.c
ffmpeg.c
+9
-23
No files found.
ffmpeg.c
View file @
d8e075b1
...
@@ -872,29 +872,6 @@ static int configure_audio_filters(FilterGraph *fg, AVFilterContext **in_filter,
...
@@ -872,29 +872,6 @@ static int configure_audio_filters(FilterGraph *fg, AVFilterContext **in_filter,
*
out_filter
=
format
;
*
out_filter
=
format
;
}
}
if
(
audio_sync_method
>
0
)
{
AVFilterContext
*
aswr
;
char
args
[
256
]
=
{
0
};
av_strlcatf
(
args
,
sizeof
(
args
),
"min_comp=0.001:min_hard_comp=%f"
,
audio_drift_threshold
);
if
(
audio_sync_method
>
1
)
av_strlcatf
(
args
,
sizeof
(
args
),
":max_soft_comp=%f"
,
audio_sync_method
/
(
double
)
icodec
->
sample_rate
);
av_log
(
NULL
,
AV_LOG_INFO
,
"-async %d is forwarded to lavfi similarly to -af aresample=%s
\n
"
,
audio_sync_method
,
args
);
ret
=
avfilter_graph_create_filter
(
&
aswr
,
avfilter_get_by_name
(
"aresample"
),
"aresample"
,
args
,
NULL
,
fg
->
graph
);
if
(
ret
<
0
)
return
ret
;
ret
=
avfilter_link
(
*
in_filter
,
0
,
aswr
,
0
);
if
(
ret
<
0
)
return
ret
;
*
in_filter
=
aswr
;
}
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
AVFilterContext *filt_ctx; \
AVFilterContext *filt_ctx; \
\
\
...
@@ -914,6 +891,15 @@ static int configure_audio_filters(FilterGraph *fg, AVFilterContext **in_filter,
...
@@ -914,6 +891,15 @@ static int configure_audio_filters(FilterGraph *fg, AVFilterContext **in_filter,
*in_filter = filt_ctx; \
*in_filter = filt_ctx; \
} while (0)
} while (0)
if
(
audio_sync_method
>
0
)
{
char
args
[
256
]
=
{
0
};
av_strlcatf
(
args
,
sizeof
(
args
),
"min_comp=0.001:min_hard_comp=%f"
,
audio_drift_threshold
);
if
(
audio_sync_method
>
1
)
av_strlcatf
(
args
,
sizeof
(
args
),
":max_soft_comp=%f"
,
audio_sync_method
/
(
double
)
icodec
->
sample_rate
);
AUTO_INSERT_FILTER
(
"-async"
,
"aresample"
,
args
);
}
if
(
ost
->
audio_channels_mapped
)
{
if
(
ost
->
audio_channels_mapped
)
{
int
i
;
int
i
;
AVBPrint
pan_buf
;
AVBPrint
pan_buf
;
...
...
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